hello,
I know this topic has been covered and ansewered many times in previous discussions by i still encounter the same problem.
When sending an email via a scheduled agent, hotmail users receive as the sender a classy “(unknown)” instead of the person who they are supposed to see.
Here is my code:
Sub SendreturnReceipt(Db As NotesDatabase, AppProfile As NotesDocument, Doc As NotesDocument, myref)
Dim Dbprofile As NotesDocument
Set Dbprofile = db.GetProfileDocument( "ColorProfile" )
Set ReturnReceipt = New NotesDocument(Db)
ReturnReceipt.Form = "Memo"
ReturnReceipt.From = "<" & DbProfile.MailboxReplyTo(0) &">"
ReturnReceipt.Principal = "<" & DbProfile.MailboxReplyTo(0) &">"
ReturnReceipt.ReplyTo = "<" & DbProfile.MailboxReplyTo(0) &">"
ReturnReceipt.Subject = AppProfile.Subject(0) & ", Ref: " & myRef(0)
ReturnReceipt.sendTo = Doc.From(0)
Set Body = New NotesRichTextItem(ReturnReceipt, "Body")
Call Body.AppendText(AppProfile.Body(0))
Call ReturnReceipt.Send (False, False)
'Call agentLog.LogAction("Return Receipt sent to: " & Doc.From(0))
End Sub
I’ve added a replyto field (that works), a Principal, a From and I always get the same result when viewing this message from my hotmail account.
Any help would be appreciated.
Thanks in advance,
Thierry Soubestre
Subject: unknown from for hotmail destination
Thierry,
I had a similar problem with HOTMAIL (and others). Though I don’t exactly recall which field solved the HOTMAIL problem, I add the following 5 fields to the newly composed mail document to enable all large providers known to me to correctly handle the mail:
FROM
SENDER
PRINCIPAL
REPLYTO
SMTPORIGINATOR
With these fields, HOTMAIL (and AOL …) display the sender correctly.
Try adding the SENDER and SMTPORIGINATOR fields.
Have fun,
Stephan Holowaty
Principal Certified Lotus Instructor SA&AD
IBM Certified Instructor Websphere App Server (SA)
IBM Certified Instructor Websphere Portal Server (SA)
mailto:stephan.holowaty@holowaty.de
Subject: unknown from for hotmail destination: oops, missed one thing
Eh, there is one crucial point I missed to mention:
After setting the addressing fields, do not (!) mail.send() the mail from the backend document.
This will end in the HOTMAIL recipient getting a UNKNOWN sender message.
Instead, COPY the document to mail.box and have the router pick the message up from there.
So, a backend agent would use some code like this to “send” the mail:
…
Dim mailbox As New NotesDatabase(“”,“”)
Call mailbox.Open(“myservername/myorg”,“mail.box”)
Call email.CopyToDatabase(mailbox)
This should work for most freemail services; I’ve tested with most of the freemail services available in Germany …
Have fun,
Stephan