![]() |
using System.Web.Mail ?
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 = femi@yahoo.com Dim a As System.Web.Mail.SmtpMail a.Send(mo) Line 8: mo.To = "femi@yahoo.co.uk" Line 9: Dim a As System.Web.Mail.SmtpMail Line 10: a.Send(mo) Line 11: Line 12: %>Thanks in advance |
Re: using System.Web.Mail ?
<femi> wrote in message news:u99vB620HHA.5408@TK2MSFTNGP02.phx.gbl...
> I received an unhandles exception in my email form as follows Sigh - and what does the unhandled exception say...? -- Mark Rae ASP.NET MVP http://www.markrae.net |
Re: using System.Web.Mail ?
Also, set your "from" property.
"Mark Rae [MVP]" <mark@markNOSPAMrae.net> wrote in message news:O6V%23A$20HHA.5764@TK2MSFTNGP03.phx.gbl... > <femi> wrote in message news:u99vB620HHA.5408@TK2MSFTNGP02.phx.gbl... > >> I received an unhandles exception in my email form as follows > > Sigh - and what does the unhandled exception say...? > > > -- > Mark Rae > ASP.NET MVP > http://www.markrae.net |
Re: using System.Web.Mail ?
The server rejected one or more recipient addresses. The server response
was: 550 5.7.1 Unable to relay for femi@yahoo.co.uk 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 = test@yahoo.co.uk objCDONTSMail.To = femi@yahoo.co.uk objCDONTSMail.subject = "ghghghg" objCDONTSMail.Body = "saassasa" objCDONTSMail.Send This works, so why the aspx scripts is unable to relay? |
Re: using System.Web.Mail ?
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. <femi> wrote in message news:OKcw4230HHA.1188@TK2MSFTNGP04.phx.gbl... > The server rejected one or more recipient addresses. The server response > was: 550 5.7.1 Unable to relay for femi@yahoo.co.uk > 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 = test@yahoo.co.uk > objCDONTSMail.To = femi@yahoo.co.uk > objCDONTSMail.subject = "ghghghg" > objCDONTSMail.Body = "saassasa" > objCDONTSMail.Send > > This works, so why the aspx scripts is unable to relay? > > |
Re: using System.Web.Mail ?
> 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 |
Re: using System.Web.Mail ?
Downloadable examples for 1.1 and 2.0 can be found at: http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!138.entry ................. There are different rules depending on which smtp server you're trying to use. The downloadable code samples will make this more clear. <femi> wrote in message news:u99vB620HHA.5408@TK2MSFTNGP02.phx.gbl... >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 = femi@yahoo.com > Dim a As System.Web.Mail.SmtpMail > a.Send(mo) > > Line 8: mo.To = "femi@yahoo.co.uk" > Line 9: Dim a As System.Web.Mail.SmtpMail > Line 10: a.Send(mo) > Line 11: > Line 12: %>Thanks in advance > > |
Re: using System.Web.Mail ?
http://www.systemwebmail.com/faq/4.3.11.aspx
Juan T. Llibre, asp.net MVP asp.net faq : http://asp.net.do/faq/ foros de asp.net, en espaņol : http://asp.net.do/foros/ ====================================== <femi> wrote in message news:Oa0ayd40HHA.5980@TK2MSFTNGP04.phx.gbl... >> 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 > > |
Re: using System.Web.Mail ?
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. |
| All times are GMT. The time now is 10:01 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.