Using outlook API, am able to send email without setting any sender's email Id. Heres my C# code:
Outlook.Application oApp = new Outlook.Application();Outlook.MailItem email = (Outlook.MailItem)(oApp.CreateItem(Outlook.OlItemType.olMailItem));email.Recipients.Add("[email protected]");//email.Sender.Address = "[email protected]";email.Subject = "TestSubject";email.Body = "TestBody";((Outlook.MailItem)email).Send();
If I want to send this mail using a different email Id, say [email protected], what do I need to do?
Please advise.
Thanks.