Fix the MailItem.Send() warning
Sometimes you need to create and send mails in your code. There are many ways to solve this requirement. You can connect to your Exchange with WebServices or you can use a WebService to connect to a SMTP server. But what if you are not able to connect to them, but you know the client is using Outlook. You can call Oulook to send your mails. That is pretty easy all you need is the interop namespace of Outlook (using Oulook = Micosoft.Office.Interop.Outlook;). The code you need for this should contain lines of the following snippet: 1 2 3 4 5 6 // ..call Outlook .. // create the mailitem Outlook.MailItem mItem = outlookapplication.CreateItem(Outlook.OlItemType.olMailItem); // ..set subject, body recipient and much more.. // send the mail mItem.Send();