using System.Web.Mail ?

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
 
G

Guest

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?
 
A

Aidy

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

Guest

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
 
G

Guest

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.
 

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

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top