Problem Generating Mail Messages

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.
 
M

mphacker

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

send mail not working 1
mail problem 2
sending an email... 2
Sending email from ASP.NET application. 1
Send Mail on local machine 2
Send e-mails with a webform 2
SMTPMail Error 2
sending aspx as email 3

Top