Control Of The From Field In Mails Sent From Agents

In many databases there is one or more agents that's sends mail. On all mails, the Notes mailer set's the 'from'...

field to the programmers name (the person that have made or last saved the agent). The programmer will receive a lot of replys on these mails. You cant change the From field on mailed documents - this is done automatically by the server or the clients mailer program. But you can change the From field on Saved documents - so the solutions is simpel: 1. Create the mail as a new document in the servers 2. Assign values to these fields: Form = Memo SendTo = Name, group, shortname for receipients Receipients = Fullnames for all receipients for the mail From = Who is the mail from? The user will reply to this address 3. Save the document Now the servers mailer task will process the document as a normal mail. 'Sent a mail to Peter from Santa dim session as new NotesSession dim thisDb as NotesDatabase dim mailboxDb as NotesDatabase dim mailDoc as NotesDocument 'Locate the servers database set thisDb = session.CurrentDatabase set mailboxDb = session.GetDatabase( thisDb.server, "" ) 'Create the new mail set mailDoc = mailboxDb.CreateDocument 'Assign values to the fields in the mail mailDoc.Form = "Memo" mailDoc.SendTo = "Peter" mailDoc.Receipients = "Peter/TheCompany" mailDoc.From = "Santa" mailDoc.Subject = "Mail from Santa" mailDoc.Body = "The text goes here" 'Save the document in the (if you Send the document, Notes will overwrite the From field) call mailDoc.Save( True, True )

This was first published in November 2000

Dig Deeper



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:




  • iSeries tutorials'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 ...