E
ES
Hello,
I have very simple console app that attempts to send an email using
system.web.mail. I compiles and runs without any errors but doesn't send
anything. I've checked the badmail folder, etc and I don't see anything.
Should the mail object work in a console app? I've changed the addresses
shown for this message. The actual programm had valid addresses.
The entire program is:
Imports System.Web.Mail
Module Mailer
Sub Main()
Dim m As MailMessage = New MailMessage
m.To = "(e-mail address removed)"
m.From = "(e-mail address removed)"
m.Subject = "The webserver SMTP service is running"
m.Priority = MailPriority.Low
m.Body = "The webserver SMTP service is running at: " &
CStr(DateTime.Now)
m.BodyFormat = MailFormat.Text
SmtpMail.Send(m)
End Sub
End Module
I have very simple console app that attempts to send an email using
system.web.mail. I compiles and runs without any errors but doesn't send
anything. I've checked the badmail folder, etc and I don't see anything.
Should the mail object work in a console app? I've changed the addresses
shown for this message. The actual programm had valid addresses.
The entire program is:
Imports System.Web.Mail
Module Mailer
Sub Main()
Dim m As MailMessage = New MailMessage
m.To = "(e-mail address removed)"
m.From = "(e-mail address removed)"
m.Subject = "The webserver SMTP service is running"
m.Priority = MailPriority.Low
m.Body = "The webserver SMTP service is running at: " &
CStr(DateTime.Now)
m.BodyFormat = MailFormat.Text
SmtpMail.Send(m)
End Sub
End Module