Sending an email with a custom “sender” with Lotus Notes/Domino
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.
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
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…
provided by Julian Robichaux at nsftools.com.