DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Tue, 31 Jul 2007 13:29:53 +0100,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    femi
          2    Mark Rae [MVP]
          3    James
                 4    femi
          5    Aidy
                 6    femi
                        7    Juan T. Llibre
          8    sloan
          9    femi


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
Date:Tue, 31 Jul 2007 13:29:53 +0100   Author:  

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
Date:Tue, 31 Jul 2007 13:39:12 +0100   Author:  

Re: using System.Web.Mail ?   
Also, set your "from" property.

"Mark Rae [MVP]"  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 
Date:Tue, 31 Jul 2007 09:56:17 -0400   Author:  

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?
Date:Tue, 31 Jul 2007 15:18:47 +0100   Author:  

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?
>
> 
Date:Tue, 31 Jul 2007 15:47:45 +0100   Author:  

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
Date:Tue, 31 Jul 2007 16:28:24 +0100   Author:  

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
>
> 
Date:Tue, 31 Jul 2007 11:39:45 -0400   Author:  

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 espaol : 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
>
> 
Date:Tue, 31 Jul 2007 12:19:37 -0400   Author:  

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.
Date:Wed, 1 Aug 2007 14:14:05 +0100   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us