Hi All,
I have an agent which is scheduled to run on a server. The agent shoots out a few mails everyday.
For testing the agent, I run it on my local client. When run on the client, the following code works perfectly. (Thanks to a few posts on the community). The mails are generated in SMTP format.
Call maildoc.ReplaceItemValue(“Form”,“Bookmark”)
Call maildoc.ReplaceItemValue(“Principal”,“Aditya Jois”)
Call maildoc.ReplaceItemValue(“DisplaySent”,“Aditya Jois”)
so, when the user receives the mail, s/he will see the It with the name Aditya Jois in the Inbox and Sent By as Aditya Jois
This is fine, but, when the agent is run on server, the mails generated are in MIME format and all this code is a waste and does not work as intended.
Another problem is that, when I embed a doclink, it works fine in SMTP but not in MIME. So, I came up with this code
If notesag.ServerName <> “” Then
Call rtitem.AppendText(doclink.NotesURL)
Call rtitem.AddNewline(2)
Else
Call rtitem.AppendDocLink(doclink,CurrDB.Title)
End If
i.e. if it is running on a server, I embed the NotesURL else I attach the doclink.
Does anyone have an alternative solution? Any help would be appreciated.
Regards,
Adi