Let Applications Send Mail Addressed From Themselves

Here is the code you need to let one of your applications send a mail and address it from itself, instead of from the server or from the persons name that saved the agent. Basically, what you are going to do with the code is bypass the Notes "Send" functionality. Instead of letting the application send the email, you are going make code the will actually create the memo in the mail.box of the server and trick the server into sending...

the mail for you with a from address of whomever you want. Here is the raw LotusScript code to create an email in the mail.box.

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
This Content Component encountered an error

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close