R
rdi
The import statements weren't copy/pasted, but everything INSIDE the class WAS copy pasted from the help file. Starting with the myMail.From line and going down to the SmtpMail.Send line, EVERY line results in a "Declaration Expected" error.
--
RDI
(remove the exclamation from the email address)
Imports System.Web
Imports System.Web.Mail
Imports System.Web.Mail.SmtpMail
Imports System.Web.Mail.MailAttachment
Imports System.Web.Mail.MailMessage
Imports System.Web.Mail.MailFormat
Public Class myEMail
Dim myMail As New MailMessage()
myMail.From = "(e-mail address removed)"
myMail.To = "(e-mail address removed)"
myMail.Subject = "UtilMailMessage001"
myMail.Priority = MailPriority.Low
myMail.BodyFormat = MailFormat.Html
myMail.Body = "<html><body>UtilMailMessage001 - success</body></html>"
SmtpMail.Send(myMail)
End Class
--
RDI
(remove the exclamation from the email address)
Imports System.Web
Imports System.Web.Mail
Imports System.Web.Mail.SmtpMail
Imports System.Web.Mail.MailAttachment
Imports System.Web.Mail.MailMessage
Imports System.Web.Mail.MailFormat
Public Class myEMail
Dim myMail As New MailMessage()
myMail.From = "(e-mail address removed)"
myMail.To = "(e-mail address removed)"
myMail.Subject = "UtilMailMessage001"
myMail.Priority = MailPriority.Low
myMail.BodyFormat = MailFormat.Html
myMail.Body = "<html><body>UtilMailMessage001 - success</body></html>"
SmtpMail.Send(myMail)
End Class