sending email

  • Thread starter Thread starter barry
  • Start date Start date
B

barry

The code below is in a button but though there is no error message of any
kind I am not getting the email which I am sending to myself. Any help would
be appreciated.

System.Web.Mail.SmtpMail.SmtpServer = "127.0.0.1"

System.Web.Mail.SmtpMail.Send(TextBox1.Text, TextBox2.Text, TextBox3.Text,
TextBox4.Text)
 
You need to be sure that SMTP is running and setup properly on your
computer(server) since you are sending to localhost:

Are you running an SMTP server locally (on localhost)?
If you are, check the mailroot directorys, specifically, the badmail folder,
I bet your email is in there.

From the server, you can telnet to port 25, and issue SMTP commands
manually, something like:
Telnet localhost 25
HELO myserver.com
MAIL FROM:[email protected] (put brackets around the email addresses, OE is
taken them out)
RCPT TO:[email protected] (put brackets around the email addresses, OE is
taken them out)
DATA
This is a test
..

If you do not get this email assuming you put your email address in the RCPT
TO, then there is a problem with your SMTP server.

Steve
 
Thanks for the response.
Yes the email is going to the badmail folder and when I look at the .BAD
suffix it shows my email but I do not understand why it is being rejected.
The .BRD suffix shows "The specific error code was 0xC00402C7."

If there is anything else I can send to help solve this let me know.

thanks
 
Back
Top