I found this code snippet from "http://www.codeproject.com/Tips/165548/C-Code-snippet-to-send-an-Email-with-attachment-fr"
// Create the Outlook application.
Outlook.Application oApp = new Outlook.Application();
// Create a new mail item.
Outlook.MailItem oMsg = (Outlook.MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);
// Set HTMLBody.
oMsg.HTMLBody = "Test"
//Subject line
oMsg.Subject = "Test Sub";
// Add a recipient.
Outlook.Recipients oRecips = (Outlook.Recipients)oMsg.Recipients;
// Change the recipient in the next line if necessary.
Outlook.Recipient oRecip;
oRecip = (Outlook.Recipient)oRecips.Add(UserID);
oRecip.Resolve();
oRecip = (Outlook.Recipient)oRecips.Add(Recipients[i]);
oRecip.Resolve();
// Send.
oMsg.Send();
}
I need to know how to send the mail from a specific Outlook Profile if I have a couple of profiles configured in Outlook.
Thanks in Advance, Avirup.