Outlook.Application oApp = new Outlook.Application();
//Create the new message by using the simplest approach.
Outlook.MailItem oMsg= Outlook.MailItem)oApp.CreateItem(Outlook.OlItemType.olMailItem);
//Add a recipient
Outlook.Recipient oRecip;
oRecip = (Outlook.Recipient)oMsg.Recipients.Add("xyz@xyz.com");
//Set the basic properties.
oMsg.Subject = "Payment received";
oMsg.Body = "Dear Sir, We have received payment for your order";
//Send the message.
oMsg.Save();
oMsg.Send();
//Explicitly release objects.
oRecip = null;
//oAttach = null;
oMsg = null;
oApp = null;
Monday, June 22, 2009
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment