hello_200
asked on
Done a Million Times
I am trying to send an email from a VB form, I have tried to do it a million times but most of the code that i have found is very complicated. I need something that is simple and easy to understand. The only fields that am using are TO,Subject and message.I prefer using either outlook objects or CDO whichever works.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Dim x As Outlook.MailItem
Dim a As Outlook.Application
Set a = New Outlook.Application 'using an open session or loggin on using the default profile
Set x = a.CreateItem(olMailItem)
x.To = "Hengel@tecsys.lu"
x.Subject = "Mail using outlook"
x.Body = "This is the text to send"
send"
x.Send
a.Quit
Set x = Nothing
Set a = Nothing