Mail from field for external email account

I have a button using lotusscript, I am sending external user an email message. I am using all below hidden field from Mail memo to prevent sending by my name and get name from profile document. When I look at the my hotmail account, it shows as "from :alpa.patel@eisai.com on behalf of "TestId " . I am not understanding why from field is capturing my name instead of TestId name. Which field will capture this for external email account.

Below script using all name fields from memo form.

Dim session As New Notessession

Dim db As NotesDatabase

Dim col As NotesDocumentCollection

Dim doc As NotesDocument

Dim workspace As New NotesUIWorkspace

Dim item As NotesItem, item1 As notesitem

Dim rtitem As NotesRichTextItem

Dim richStyle As NotesRichTextStyle

Set db = session.currentdatabase

'get the selected docs

Set col = db. UnprocessedDocuments 

Set richStyle = session.CreateRichTextStyle



If col Is Nothing Then

	Msgbox "none docs selected"

	Exit Sub

End If



Set doc = col.Getfirstdocument

While Not (doc Is Nothing)

'do anything with the doc

	If Not doc.HasItem( "PDAttach" ) Then

		Messagebox "The Coverletter for " & doc.Comp(0) &" " & doc.Whom(0) & " has NOT been created, Please click on Create letter button, then click on Send button."

		continue= True

	Else

		Set item = doc.GetFirstItem( "PDAttach" )

		Set item1 = doc.GetFirstItem( "Attach" )

		doc.SendDate=Today

		doc.SaveOptions="1"

		Dim profiledoc As notesdocument

		Set profileDoc = db.GetProfileDocument("Profile")

		Set memo = New NotesDocument( db )

		Dim richText As New NotesRichTextItem(memo, "Body")

		Set rtitem = New NotesRichTextItem( memo, "Body" )

		memo.principal=profileDoc.SAESendID(0)

		memo.DisplaySent=profileDoc.SAESendID(0)

		memo.From=profileDoc.SAESendID(0)

		memo.DisplayFrom_Preview=profileDoc.SAESendID(0)

		memo.DisplayFrom=profileDoc.SAESendID(0)

		memo.tmpDisplayFrom_Preview=profileDoc.SAESendID(0)

		memo.LangPrincipal=profileDoc.SAESendID(0)

		memo.AltPrincipal=profileDoc.SAESendID(0)

		memo.AltFrom=profileDoc.SAESendID(0)

		memo.tmpDisplayFrom_NoLogo=profileDoc.SAESendID(0)

		memo.tmpDisplaySentBy=profileDoc.SAESendID(0)

		memo.DisplaySent=profileDoc.SAESendID(0)

		memo.mailto=profileDoc.SAESendID(0)

		memo.StatName=profileDoc.SAESendID(0)

		memo.Form = "Memo"

		memo.Subject = doc.Comp(0)+ "- IND Safety Alert Report(s)"

		Call rtitem.AddNewLine(1)   		

		richStyle.Bold = True

		Call richText.AppendStyle(richStyle)

		Call richText.AppendText(profileDoc.BodyMessage(0))

		richStyle.Bold = False

		Call memo.CopyItem( item, "PDAttach" )

		Call memo.CopyItem( item1, "Attach" )

		memo.SendTo = doc.Whom(0) 

		memo.CopyTo = doc.WhomSE(0) 

		doc.Status="Send"

		doc.AuthorSend=session.CommonUserName

		Call doc.Save(True, True)

		Call memo.Send( True, False)

	End If

	Set doc = col.Getnextdocument(doc)

Wend

Call workspace.ViewRefresh

User is also encountering problem getting more than 3 emails. do you think this code is sending multiple times to end users?

Please advise.

amp

Subject: Mail from field for external email account

This may help:

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/aeafdab8267c9f138525714f003800d6?OpenDocument

Subject: RE: Mail from field for external email account

it didn’t not work. The external email account still show my personal email address.

personal email address + on behalf of “testid” email address both are showing.