using System.Web.Mail ?

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

Guest

I received an unhandles exception in my email form as follows

Dim mo As System.Web.Mail.MailMessage = New System.Web.Mail.MailMessage
mo.Body = "test"
mo.To = (e-mail address removed)
Dim a As System.Web.Mail.SmtpMail
a.Send(mo)

Line 8: mo.To = "(e-mail address removed)"
Line 9: Dim a As System.Web.Mail.SmtpMail
Line 10: a.Send(mo)
Line 11:
Line 12: %>Thanks in advance
 
The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for (e-mail address removed)
this is strange, I used a similar form with cdonts and asp and
I don't get this error, it's on the same server, as follows:

Set objCDONTSMail = CreateObject("CDONTS.NewMail")
objCDONTSMail.From = (e-mail address removed)
objCDONTSMail.To = (e-mail address removed)
objCDONTSMail.subject = "ghghghg"
objCDONTSMail.Body = "saassasa"
objCDONTSMail.Send

This works, so why the aspx scripts is unable to relay?
 
That's an error from the SMTP server saying it can't deliver the message.
This is nothing to do with your code per se. Are you specifying an SMTP
server to send the mail through? It seems that server can't relay the
message on.
 
This is nothing to do with your code per se. Are you specifying an SMTP
server to send the mail through? It seems that server can't relay the
message on.

I am not, but neither do I with old fashioned cdonts, so are you saying
there can be a sutuation where cdonts knows where smtp is and
aspdotnet doesn't know? I'd rather not specify this, so that it will pick
up what is appropriate without my intervention (portable script).

If not, how can I find which smtp cdonts is using, so that I can install
this info into my asp.net script.

Thanks in advance
 
Thank you, but no answers there,


My cdonts object on the same host does relay to any address

WebMail however, (on same host) doesn't replay, but now I
found that it will relay locally, i.e. back to myself.

Since cdonts does work, my logic tells me it can't be an smtp
issue.
 
Back
Top