Your SMTP server is trying to avoid being an open relay host; generally
speaking you should only send email to a server that serves the same domain
that you're from. There's nothing wrong the with SmtpMail object--this is
"by design" behavior.

A little research into how SMTP works is probably in order here, to be
honest--but the short story is, don't use an "[EMAIL PROTECTED]" address
unless you're actually part of the yahoo.com domain. (Somebody with more
SMTP knowledge than I probably needs to jump in here and confirm what I'm
saying--this is purely based on practical knowledge, not having read the
SMTP specs or anything.)

Along those lines, though, one of the things that annoys me about the
SmtpMail objects is that they don't handle authenticated SMTP, as far as I
can tell. Can anybody comment or prove me wrong? Assuming I'm right, anybody
know of an authenticated-SMTP-supporting class replacement/supplement?

Ted Neward
Speaker, Author, Instructor: .NET and Java
http://www.neward.net/ted/weblog


> -----Original Message-----
> From: Moderated discussion of advanced .NET topics.
> [mailto:[EMAIL PROTECTED] On Behalf Of Ankit
> Sent: Sunday, February 08, 2004 5:54 AM
> To: [EMAIL PROTECTED]
> Subject: [ADVANCED-DOTNET] problem using SmtpMail Object
>
> Hi all,
>
> I am getting the following error while sending mail from
> asp.net using SmtpMail Object.
>
> The Server rejected One or More recipient address. The server
> response was 550 5.7.1 Unable to relay for [EMAIL PROTECTED]
>
> Dim mailobj As new MailMessage
>
>        mailobj.To = "[EMAIL PROTECTED]"
>        mailobj.From = "[EMAIL PROTECTED]"
>        mailobj.Body = "aadasdadadada"
>
>  SmtpMail.SmtpServer = "127.0.0.1"
>        SmtpMail.Send(mailobj)
>
> However the mail is dispatching if I am using CDONTS, Using
> Server.CreateObject .
>
> Whts worng with the code, am I amissing something.
>
> Thanx
>
> Ankit
>
>
>
>
>
> ===================================
> This list is hosted by DevelopMentor.  http://www.develop.com
> Some .NET courses you may be interested in:
>
> NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
> http://www.develop.com/courses/gaspdotnetls
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

NEW! Guerrilla ASP.NET, 26 Jan 2004, in Los Angeles
http://www.develop.com/courses/gaspdotnetls

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to