Your web server is set (as it should be) to not send email from domains it
doesn't belong to. That's the "we don not relay" part of the message.

Try changing the email so that the sender is from your web server's domain
[email]testyourdomainhere.com[/email]

Otherwise, check with your network admin about the server settings.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
[url]www.aboutfortunate.com[/url]

"Out of chaos comes order."
Nietzche
"Verdict" <ranchatroomusa.com> wrote in message
news:eLQ1HtCXDHA.1480tk2msftngp13.phx.gbl...
> Hi
> My ASP.NET application is running on server A that runs the IIS5.
> On the IIS5, except for the site itself there is a virtual directory of a
> SMTP service with ASPNET user defined under the security tab.
> In the 'Relay Restrictions' window I have no limitations, which means the
> 'All except the list below' is checked and the 'Allow all computers...' is
> checked too. The Computers list in the middle is empty.
>
> My application send automatically email to a user when he complets his
> registration.
> the code is:
>
> mail.From = 'adminadmin.com'
>
> mail.To = 'testtest.com'
>
> mail.Subject = 'bla bla'
>
> mail.Body = 'text'
>
> SmtpMail.SmtpServer = server IP address
>
> mail.Cc = txtCc
>
> mail.BodyFormat = MailFormat.Html
>
> SmtpMail.Send(mail)
>
> Every time a user completes his registration he gets this error:
> The server rejected one or more recipient addresses. The server response
> was: 550 5.7.1 [email]testtest.com[/email]... we do not relay [email]adminadmin.com[/email]
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information
> about the error and where it originated in the code.
>
> Exception Details: System.Runtime.InteropServices.COMException: The server
> rejected one or more recipient addresses. The server response was: 550
5.7.1
> [email]testtest.com[/email]... we do not relay [email]adminadmin.com[/email]
>
> Source Error:
>
> An unhandled exception was generated during the execution of the
> current web request. Information regarding the origin and location of the
> exception can be identified using the exception stack trace below.
>
> Stack Trace:
>
> [COMException (0x8004020f): The server rejected one or more recipient
> addresses. The server response was: 550 5.7.1 [email]testtest.com[/email]... we do not
> relay [email]adminadmin.com[/email]
> ]
>
> [TargetInvocationException: Exception has been thrown by the target of an
> invocation.]
> System.RuntimeType.InvokeDispMethod(String name, BindingFlags
invokeAttr,
> Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture,
> String[] namedParameters) +0
> System.RuntimeType.InvokeMember(String name, BindingFlags invokeAttr,
> Binder binder, Object target, Object[] args, ParameterModifier[]
modifiers,
> CultureInfo culture, String[] namedParameters) +473
> System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
> methodName, Object[] args) +58
>
> [HttpException (0x80004005): Could not access 'CDO.Message' object.]
> System.Web.Mail.LateBoundAccessHelper.CallMethod(O bject obj, String
> methodName, Object[] args) +111
> System.Web.Mail.CdoSysHelper.Send(MailMessage message) +1840
> System.Web.Mail.SmtpMail.Send(MailMessage message) +150
> Affiliates.Global_Functions.Send_Email(String txtFrom, String txtTo,
> String txtBody, String txtSmtp, String txtSubject, String txtCc)
> Affiliates.Aff_Reg_Bank.Page_Load(Object sender, EventArgs e)
> System.Web.UI.Control.OnLoad(EventArgs e) +67
> System.Web.UI.Control.LoadRecursive() +35
> System.Web.UI.Page.ProcessRequestMain() +731
>
>
>
>
> Any help is really appreciated
> Thank you,
>
>