Problem Generating Mail Messages

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I found this code of the internet that should create a mail message:


'Create an instance of the MailMessage class
Dim objMM As New MailMessage

'Set the properties
objMM.To = "(e-mail address removed)"
objMM.From = "(e-mail address removed)"

'If you want to CC this email to someone else...
' objMM.Cc = "(e-mail address removed)"

'If you want to BCC this email to someone else...
' objMM.Bcc = "(e-mail address removed)"

'Send the email in text format
objMM.BodyFormat = MailFormat.Text
'(to send HTML format, change MailFormat.Text to MailFormat.Html)

'Set the priority - options are High, Low, and Normal
objMM.Priority = MailPriority.Normal

'Set the subject
objMM.Subject = "MetaLabels Trial Version"

'Set the body - use VbCrLf to insert a carriage return
objMM.Body = "Hi!" & vbCrLf & vbCrLf & "How are you doing?"
'Now, to send the message, use the Send method of the SmtpMail
class
SmtpMail.Send(objMM)

This seems to work, I get no error message, but the mail is not sent.

Please advise, if you can.
 
It is possible that the server does not have the necessary network
connectivity to send the mail messages. An example would be the
computer being behind a proxy, or outgoing ports are blocked on the
network.

Check the mail drop folders to see if you find your messages. The
default location would be c:\inetpub\mailroot\.

-Look in the bad subfolder. If you find your messages there, then
they couldn't be delivered by the server for some reason.
 
Back
Top