-
Code:
Dim mailMessage As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage()
mailMessage.From = "[email protected]"
mailMessage.To = "[email protected]"
mailMessage.Subject = "Email Subject"
mailMessage.BodyFormat = System.Web.Mail.MailFormat.Text
System.Web.Mail.SmtpMail.SmtpServer = "localhost"
System.Web.Mail.SmtpMail.Send(mailMessage)
wether your app is ASP .NET or not is a moot point.
-
Re:
Cander,
The code you pasted comes up with errors on using the System.Web.Mail library. Since my project is not an ASP.NET project... the developer does not allow the use of this library. Is there a way to work around this?
-
Again, it does not matter. If you are having problems, it is because you probably dont have the cdonts object which is an older component that system.web.mail is just a wrapper for.
-
Re:
Cander,
I am new to VB... how do i check if the CDONTS object is available or not installed?
Sorry to keep bugging ya.
-
I figured out the prob, i need to add the web.dll to my references under the solution explorer.
-
but i guess we still need smtp server installed for this code. i am looking for one simple email program that uses outlook express to send emails