Once the document is saved by the code in the mail.box, the Notes router takes over and routes the mail. There is no address checking or anything, it just routes the document it was given to the appropriate address. The users on the other end will not be able to tell where the email came from, unless they are very savvy Notes users. If the email is sent via the Internet there is no way possible to tell where the email came from except for the address you put in there. Oh yeah, make sure the address you use is valid, because people may try to reply to it even though you tell them not to.
Dim session As New NotesSession
Dim router As NotesDatabase
Dim docMail As NotesDocument
Set router = New NotesDatabase( "GAG01/G/WACH", "mail.box" ) 'Use your server name and mail.box name if different
Set docMail = New NotesDocument( router ) 'Starts the creation of th new email
docMail.Form = "Memo" 'Set the new email form to memo so it will have the proper fields
docMail.Subject = "Your Subject" 'Any text you want for the subject
docMail.Body = "Your Body Text" 'Any text you want for the body
docMail.From = "Corporate.Application@wachovia.com" 'The email address you want the email to be from goes here and line below
docMail.Principal = "Corporate.Application@wachovia.com"
docMail.SendTo = "Steve.Holman@wachovia.com" 'Could use group name if needed here and line below
docMail.Recipients = "Steve.Holman@wachovia.com"
docMail.PostedDate = Now() 'Uses the current date and time
docMail.DeliveredDate = Now()
docMail.ComposedDate = Now()
docMail.EncryptOnSend = False
Call docMail.Save( True, True ) 'Saves the document in the mail.box.
This was first published in January 2001