setting from address in outlook mail item
I am getting problem to set "from address" in outlook mail item. My task is to copy mails from a existing mailing system ( which stores all the mail in SQL server database) to outlook.
While creating the mail, everything works fine except i can not assign from address.
After creating a mail, when viewed in outlook, i can not see the from address.
Below is my code
Set objNewMail = golApp.CreateItem(olMailItem)
.Body = "hello"
Set a = .Recipients.Add("email@example.com")
a.Type = olOriginator
Set a = .Recipients.Add("firstname.lastname@example.org")
a.Type = olTo
.Subject = "hello"