Hi all. I got the code beleow that supposed to use external smtp to send email.But i do not know how to use it in visual studio 6.could and expert tell me how to use this code in visual studio version 6? I am new to vb so i be happy if u tell me the steps to use this code and make .exe file and on a click of a button it sends the email and shows a confirmation massge.Thanks
Code:
Set myMail=CreateObject("CDO.Message")
myMail.Subject="Sending email with CDO"
myMail.From="mymail@mydomain.com"
myMail.To="chauth@gmail.com"
myMail.TextBody="This is a message."
myMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusing")=2[/URL]
myMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")=1[/URL]
myMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendusername")="youraccount@gmail.com"[/URL]
myMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/sendpassword")="yourpassword"[/URL]
myMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserverport")=465[/URL]
myMail.Configuration.Fields.Item ("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpusessl")=true[/URL]
myMail.Configuration.Fields.Item("[URL unfurl="true"]http://schemas.microsoft.com/cdo/configuration/smtpserver")="smtp.gmail.com"[/URL]
myMail.Configuration.Fields.Update
myMail.Send
set myMail=nothing