Thursday, March 29, 2012

SMTP is not working

hi
i have a small problem while sending the mail through the SMTP from my web page.

I have used the SMTP for sending the mail

It is not showing the error, but the mail is placed in the C:\Inetpub\Mailroot\drop directory with an error message stating that the mail cannot be delivered.

I have placed my code below for ur reference


Try
Dim mailto As String = "sasidar_d@dotnet.itags.org.hotmail.com"
Dim subject As String = "UtilMailMessage001"
Dim body As String = "<html><body>UtilMailMessage001 - success</body></html>"
SmtpMail.Send("from", mailto, subject, body)
Catch ex As Exception
Me.lblstatus.InnerText = ex.Message
End Try

If any body knows the answer do reply to me

expecting an earliest solution from the techies

thanking in advanceThis definitely has to do with the configuration of your SMTP server. Can you tell us which SMTP you're using? SMTP on Windows 2000 IIS 5 or ... ? Make sure the DNS on your server is set up correctly so that the SMTP can find the mail records (MX) of the mail domain for the recipients.
Hi

I would thank you for replying to my query. To be very frank i am not aware of these configuration settings.

I am working in Windows XP machine.

Can u help me out in configuring the SMTP server and the other needed things

Awaiting for ur reply

Sasidar
so the error message says it can't be delivered. does it say anything else? what about the windows event log?

is the SMTP server rigged to relay for 127.0.0.1? what about access control? that should be the same, allow 127.0.0.1 (and preferably no-one else if you don't want to end up as a spam relay)
Perhaps this thread helps:

SMTP FAQ:
view post 268037

You should explicitly set your SmtpMail.SmtpServer = "localhost" just to be sure. Do this before the Send().

Make sure your SMTP service is running (control panel - administrative tools - internet information services) Expand your computer and select the Default SMTP Server node. If it is running, make sure it is configured properly (see post from Atrax).

0 comments:

Post a Comment