Another first for my baby girl – the “quarter” horse

August 25th, 2009 Comments

Growing up, my parents used to take us to Rocking Horse Ranch, a nice family resort kind of place in Highland, NY. It had all sorts of activities, including, but not limited to these odd metal crafts, with some sort of dry powder that you coated the metal in, and then baked.  It was run by an older woman, Miriam I think was her name, sweet lady, but we probably had a few choice names for her back then.

Aside from the memory of that, and many others, one of the prime attractions at the ranch that my brother, mom (not as much) and I,  later on, my sister, were quite fond of, was horseback riding.  My dad, who wasn’t so fond of riding, always joked that the only horse he would get on, was a quarter horse.  No, not that kind, but rather the one you put a quarter in, in front of the grocery store.  Well dad, the quarter is now 75¢, and it certainly isn’t a horse.

Her first "quarter horse"

Her first "quarter horse"

We had tried in the past to put her on one, but she wasn’t so happy about it, and we didn’t even get the quarters in before we pulled her off. But now, between balloons and these “quarter horses”, she can’t get enough, and I still can’t get enough of her.

Her first "quarter horse", the Mickey Mouse car

Her first "quarter horse", the Mickey Mouse car

Perhaps one day, when she is a bit older, we’ll take her to RHR, and see what she thinks of the horses that don’t require quarters…

Sending an email with a custom “sender” with Lotus Notes/Domino

August 17th, 2009 Comments

I recently had the need to send an email from a Notes application where the sender wasn’t going to be me, nor the agen’t signer.   I tried many methods I’d found on the forums, on the many articles, on help from twitter, and finally, by opening a PMR with Lotus support, only to be told that IBM/Lotus won’t help me because it is spoofing.

I am not spoofing anything. I have a legitimate business need to send out emails, where there is no mention of the user performing the action, nor the signer of an agent, nor the server’s id either.

If I set the mail document’s fields, nothing should be changing them.

e.g.
Dim mysender As String, mysenderN As String
mysender = "emaillistedinNAB@myinetdomain.com"
mysenderN = mysender & "@NotesDomain" 'Needed for internal routing only
maildoc.From = mysenderN
maildoc.SMTPOriginator = mysender
maildoc.Sender = mysender
maildoc.Principal = mysenderN
maildoc.INETFROM = mysender
...
maildoc.send (true,false)

If I stop the router, and look at the document in the mail.box, the INETFROM shouldn’t be different, but it is, and it is my email address, well, the address associated with my .id file.

I see far too many posts and things about this in the forums.  I’ve looked and looked, but couldn’t spot how to accomplish this.  Well, I finally read it somewhere, and I can’t remember where, but put simply, if you are working in the mail.box, don’t use the “send” method, simply use the “save” method, and voilà, the mail will leave how you programmed it.

This is my example code for sending a MIME email, with a “spoofed” sender using Lotus Notes/Domino 8.5. Is it perfect – no, but it does work for me…

Dim s As New NotesSession Dim Subject As String, SendTo As String Dim Sender As String, SenderN As String 'the address you want the mail to appear to be from Sender = "FName LName <flname@domain.com>" SenderN = "FName LName <flname@domain.com@NotesDomain>" 'Alternatively, you could just use: 'Sender = "flname@domain.com" 'SenderN = Sender & "@NotesDomain" subject = "This is the subject line" SendTo = "someone@somedomain.com" Dim DBmbox As New NotesDatabase("servername", "mail.box") Dim mail As New NotesDocument( DBmbox ) s.ConvertMIME = False ' Do not convert MIME to rich text Dim body As NotesMIMEEntity Dim header As NotesMIMEHeader Dim stream As NotesStream Dim child As NotesMIMEEntity Set stream = s.CreateStream Set body = mail.CreateMIMEEntity Set header = body.CreateHeader({MIME-Version}) Call header.SetHeaderVal("1.0") Set header = body.CreateHeader("Content-Type") Call header.SetHeaderValAndParams({multipart/alternative;boundary="=NextPart_="}) 'Add the to field Set header = body.CreateHeader("To") Call header.SetHeaderVal(SendTo) 'Add Subject Line Set header = body.CreateHeader("Subject") Call header.SetHeaderVal(subject) 'Add the body of the message Set child = body.CreateChildEntity Call stream.WriteText("<p>") Call stream.WriteText("<font face=Verdana color=#0288C1 size=3>") Call stream.WriteText(|<div class="headerlogo">|) 'If you are referencing any external files, images, javascript, you must use a fully qualified URL/Path Call stream.WriteText (|<img src="http://yourserver.com/images/somelogo.gif" alt="SomeLogo">|) Call stream.WriteText(|</div></font>|) Call stream.WriteText(|...some more HTML |) Call child.setContentFromText(stream, {text/html;charset="iso-8859-1"}, ENC_NONE) Call stream.Truncate 'Not sure if I need this Call stream.Close Call mail.CloseMIMEEntities(True) Call mail.replaceItemValue("Form", "Memo") Call mail.replaceItemValue("Recipients", SendTo) Call mail.replaceItemValue( "From", SenderN ) Call mail.replaceItemValue( "InetFrom", Sender ) 'Since we created the mail in the mail.box, we just need to save it, not send it! Call mail.Save(True,False) s.ConvertMIME = True ' Restore conversion
This LotusScript was converted to HTML using the ls2html routine,
provided by Julian Robichaux at nsftools.com.

Bad Behavior has blocked 74 access attempts in the last 7 days.