Forward Agent

Hello,

I have a user who is overseas. When I send an email to Test User1 it reaches to his lotus notes mail account. I also have created an agent signed by Test user1 ID. Which forwards new email to his blackberry account.

Now the problem is, whenever he gets an email to his blackberry, it always shows for From, his name.

For example ,

if Sender is “Test User2” sends an email to “Test User1”. When Test user1 receives an email on his blackberry, it shows for From, “Test User1”, how to keep From unchange while forwarding an email to his blackberry account?

Thanks in advance

Urit

Subject: Forward Agent

When you send an email from an agent it will appear to have come from the person that signed the agent. You can get around this (somewhat) by adding the correct From to the field Principal. You might have to add the original name to the ReplyTo field.

One of the strengths of Notes mail is it is hard to Spoof who an email is from. One of the weaknesses of Notes Mail is if you really legitimately need to ‘spoof’ an email like you are doing it is tough.

Subject: RE: Forward Agent

Thanks for your reply.

I created an agent with simple action. Where should I define “by adding the correct From to the field Principal” ?

Urit

Subject: RE: Forward Agent

You would have to do this with either @Functions or Lotus Script. Shortly after answering your question I ran into this

http://www.agecom.com.au./agecom.nsf/ProductsByCategory?OpenView&Count=100&Title=Downloads±+By+Category&Expand=2

Which is a script that you might want to look at, it really takes care of all of the addressing issues by writting directly into the Mail.box I had forgotten that I had done something like that when I was moving a document from a mail-in database to my mail file. I select a document from the mail-in DB and click the button with this code attached:

Sub Click(Source As Button)

Dim session As New NotesSession	

Dim Db As NotesDataBase

Dim Collection As NotesDocumentCollection



Set db = session.CurrentDatabase



Dim newMailDoc As NotesDocument

Dim thisNote As NotesDocument

Dim recipAddress As String

Dim servername As String

'ServerName = Db.Server

servername = "CN=Production/O=Workflo Systems"    ' <<< Enter your server name here



Set collection = db.UnprocessedDocuments	

Set thisNote = collection.GetFirstDocument



recipAddress = Session.UserName



While Not thisNote Is Nothing		

	

	Dim mailbox As NotesDatabase

	Set mailbox = New NotesDatabase(servername, "mail.box")

	

	Set newMailDoc = mailbox.CreateDocument()

	Call thisNote.CopyAllItems(newMailDoc, True)	

	newMailDoc.Recipients = recipAddress

	newMailDoc.SendTo = recipAddress

	Call newMailDoc.RemoveItem("SMTPOriginator")

	If Not thisNote.Form(0) = "Return Receipt" Then

		Call newMailDoc.RemoveItem("IntendedRecipient")

	End If	

	

	Call newMailDoc.Save(True, True)		

	Set thisNote = collection.GetNextDocument(thisNote)

Wend

End Sub

This code sends the email to whoever runs the agent and it maintains the From field etc. If you don’t want to use the product from AgeCom.Com then with a little LotusScript you should be able to modify this piece of code to do what you want. The trick is to write it directly to the Mail.box which does an end run arround the code that sets the from field etc. I stole (borrowed) this from an example someone else posted somewhere so I don’t take any credit (or blame) for this. Writing directly to mail.box is not supported by Lotus, but I know my example works al the way through 7 (I use it every day).

Subject: RE: Forward Agent

Thanks for your guidance.

This information will be helpful.

I will check this code and will work on it.

Urit

Subject: Forward Agent

I think in ND7 there is a Rule that will send a copy to another recipient. See if that works for you. I don’t have 7 so I cannot test it but let us now if it works by posting results here.

Subject: RE: Forward Agent

Thanks for your reply. Actually, I wanted to do it by wrtting code. I did looked at the Mail rules but I did not much flexibility.

Urit