Websnaky
asked on
Send mails via Authsmtp using a visual Basic programm (VB6)
Helllo
I am looking for an exemple on how to send an email from a VB6 program using the smtp server 'authsmtp' and without using an email client like Outlook etc
Authsmtp website = www.authsmtp.com
I am looking for an exemple on how to send an email from a VB6 program using the smtp server 'authsmtp' and without using an email client like Outlook etc
Authsmtp website = www.authsmtp.com
the easiest way is to use http://www.freevbcode.com/ShowCode.Asp?ID=109
example code VB.NET attached
You MUST use VB6 ?!
You MUST use VB6 ?!
Private Sub Page_Load(sender As Object, e As System.EventArgs)
Dim mail As New MailMessage()
mail.To = "me@mycompany.com"
mail.From = "you@yourcompany.com"
mail.Subject = "this is a test email."
mail.Body = "Some text goes here"
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1") 'basic authentication
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "my_username_here") 'set your username here
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "super_secret") 'set your password here
SmtpMail.SmtpServer = "mail.mycompany.com" 'your real server goes here
SmtpMail.Send(mail)
End Sub 'Page_Load
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.