Problem sending email through asp.net page (only certain addresses)

V

VB Programmer

I have an ASPX page where I send out emails through my mail server
mail.MyDomain.com. When I send emails to (e-mail address removed) it sends
PERFECTLY. When I try sending an email to any other address
(non-MyDomain.com address) I get the following error:

The server rejected one or more recipient addresses. The server response
was: 550 You must check your mail from this IP or SMTP Auth before sending
to (e-mail address removed)

Here's the FULL error:
System.Web.HttpException: Could not access 'CDO.Message' object. --->
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. --->
System.Runtime.InteropServices.COMException (0x8004020F): The server
rejected one or more recipient addresses. The server response was: 550 You
must check your mail from this IP or SMTP Auth before sending to
(e-mail address removed) --- End of inner exception stack trace --- at
System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr,
Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture,
String[] namedParameters) at System.RuntimeType.InvokeMember(String name,
BindingFlags invokeAttr, Binder binder, Object target, Object[] args,
ParameterModifier[] modifiers, CultureInfo culture, String[]
namedParameters) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object
obj, String methodName, Object[] args) --- End of inner exception stack
trace --- at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj,
String methodName, Object[] args) at
System.Web.Mail.CdoSysHelper.Send(MailMessage message) at
System.Web.Mail.SmtpMail.Send(MailMessage message) at
EarlyAlert3.EmailManager.cmdConfirmSendEmail_Click(Object sender, EventArgs
e)

Any ideas?
 
S

Scott Allen

Typically this means you are not allowed to "relay" email though your
mail server. A network admin may have to allow relay access from the
IP of your application.

For more info, see:
http://systemwebmail.com/faq/1.4.aspx

Also see section 4.3.* in the above document.

Hope this helps!
 
T

tma

Have you enabled IIS to relay for 127.0.0.1?

Then set SmtpMail.SmtpServer = "127.0.0.1"
 
V

VB Programmer

Thanks. I changed the mail server address and it worked.

Scott Allen said:
Typically this means you are not allowed to "relay" email though your
mail server. A network admin may have to allow relay access from the
IP of your application.

For more info, see:
http://systemwebmail.com/faq/1.4.aspx

Also see section 4.3.* in the above document.

Hope this helps!

--
Scott
http://www.OdeToCode.com

I have an ASPX page where I send out emails through my mail server
mail.MyDomain.com. When I send emails to (e-mail address removed) it sends
PERFECTLY. When I try sending an email to any other address
(non-MyDomain.com address) I get the following error:

The server rejected one or more recipient addresses. The server response
was: 550 You must check your mail from this IP or SMTP Auth before sending
to (e-mail address removed)

Here's the FULL error:
System.Web.HttpException: Could not access 'CDO.Message' object. --->
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. --->
System.Runtime.InteropServices.COMException (0x8004020F): The server
rejected one or more recipient addresses. The server response was: 550 You
must check your mail from this IP or SMTP Auth before sending to
(e-mail address removed) --- End of inner exception stack trace --- at
System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr,
Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture,
String[] namedParameters) at System.RuntimeType.InvokeMember(String name,
BindingFlags invokeAttr, Binder binder, Object target, Object[] args,
ParameterModifier[] modifiers, CultureInfo culture, String[]
namedParameters) at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object
obj, String methodName, Object[] args) --- End of inner exception stack
trace --- at System.Web.Mail.LateBoundAccessHelper.CallMethod(Object obj,
String methodName, Object[] args) at
System.Web.Mail.CdoSysHelper.Send(MailMessage message) at
System.Web.Mail.SmtpMail.Send(MailMessage message) at
EarlyAlert3.EmailManager.cmdConfirmSendEmail_Click(Object sender, EventArgs
e)

Any ideas?
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top