' send mail in outlook
' taken from Example03.vb
'
Private Sub Example03Main()

   ' start outlook
   Dim outlookApplication = New Outlook.Application()

   ' Create a new MailItem.
   Dim mailItem As Outlook.MailItem = outlookApplication.CreateItem(OlItemType.olMailItem)

   ' prepare item and send
   mailItem.Recipients.Add("eric@cartman.com")
   mailItem.Subject = "hello eric"   
mailItem.Body = "Season Greetings from NetOffice. Kind Regards - Sebastian"
mailItem.Send() ' close outlook and dispose outlookApplication.Quit() outlookApplication.Dispose() End Sub

Last edited Jun 13, 2012 at 11:03 AM by SebastianDotNet, version 6

Comments

No comments yet.