C
Carmine [www.thetotalsite.it]
Hi everyone,
I get a really odd error while using SMTPClient.Send() function in ASP.Net.
The error is the following:
Dim smtp As New Net.Mail.SmtpClient("smtp.thetotalsite.it", 25)
Dim bodyMSG As String
bodyMSG = "something"
smtp.Send("(e-mail address removed)",
(e-mail address removed), "Message from thetotalsite", bodyMSG)
Well, on my local machine (using the integrated web server of Visual
Studio), it works...
Incredibly, on the remote web server, it does not work!
It seems as if the web server filtered emails coming from localhost/ASP.Net
runtime
The runtime give me this error:
System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The
server response was: Relay denied
at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender,
MailAddressCollection recipients, String deliveryNotify,
SmtpFailedRecipientException& exception)
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at System.Net.Mail.SmtpClient.Send(String from, String recipients, String
subject, String body)
at controls_comments.Submit_Click(Object sender, EventArgs e)
So, "Relay denied"... But I'm using an existing email account!
([email protected]) and, in fact, it works perfectly on Outlook
Express or Visual Studio.
Why this strange behavior? Is it a bug? How can I solve it?
Thanks in advance,
P.s.: I'm using .Net Framework 2.0.
I get a really odd error while using SMTPClient.Send() function in ASP.Net.
The error is the following:
Dim smtp As New Net.Mail.SmtpClient("smtp.thetotalsite.it", 25)
Dim bodyMSG As String
bodyMSG = "something"
smtp.Send("(e-mail address removed)",
(e-mail address removed), "Message from thetotalsite", bodyMSG)
Well, on my local machine (using the integrated web server of Visual
Studio), it works...
Incredibly, on the remote web server, it does not work!
It seems as if the web server filtered emails coming from localhost/ASP.Net
runtime
The runtime give me this error:
System.Net.Mail.SmtpFailedRecipientException: Mailbox unavailable. The
server response was: Relay denied
at System.Net.Mail.SmtpTransport.SendMail(MailAddress sender,
MailAddressCollection recipients, String deliveryNotify,
SmtpFailedRecipientException& exception)
at System.Net.Mail.SmtpClient.Send(MailMessage message)
at System.Net.Mail.SmtpClient.Send(String from, String recipients, String
subject, String body)
at controls_comments.Submit_Click(Object sender, EventArgs e)
So, "Relay denied"... But I'm using an existing email account!
([email protected]) and, in fact, it works perfectly on Outlook
Express or Visual Studio.
Why this strange behavior? Is it a bug? How can I solve it?
Thanks in advance,
P.s.: I'm using .Net Framework 2.0.