Hi,
My company has been taken over and they want to have email for my users forwarded to their mail system. My users will then access their new email account via a browser.
As they want to do this in a phased approach I can’t do it by server. So my first thought was to populate the Forwarding Address field in their Person Document with the new email address that they will have.
Does anyone have the code to create the Forwarding Address based on the current email address using an agent?
My users currently have an email address in the format firstname.lastname@currentcompany.com and I want to use an agent to create a new forwarding email address of firstname.lastname@newcompany.com that I can run on selected users as and when they need to be migrated.
Any help is greatly appreciated.
Andy.
Subject: Agent to set forwarding address
Hi Andrew,You may try this agent created by me. You have to change the domain (“mail.dev.com”)as per your organiization’s requirement.One the agent is created on your NAB, go to the ‘People’ view and select the person doc which you wish to change and run the agent. Hope it helps 
'-----------Agent Start------------
Sub Initialize
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim MailAddress As String
Set uidoc = workspace.EditDocument (True)
Call uidoc.FieldSetText("MailAddress", Lcase$(uidoc.FieldGetText( "FirstName" )+"."+uidoc.FieldGetText("LastName"))+"@mail.dev.com")
Call uidoc.Save
Call uidoc.Close
End Sub
'----------Agent End------
Regards,
Dev
Subject: Thanks a lot
Dear Devpushpa,
That agent works perfectly.
Thanks very much for your help.
Andy.