Problem with Sending Email outside of Domain

G

Guest

Hi

I am making a project that sends emails.I m using System.Web.Mail and smtpMail.Send() to send emails

i have set my SmtpMail.SmtpServer to my remote serve

The problem is
I m not able to send emails outside of my domain that is to hotmail ,yahoo or indiatimes,etc.But i m able to send thru Outlook Express that configured with this smtp server

Also my server requires Authentication?How to go about it in my project

Please help me to solve this problem.
 
C

Cowboy \(Gregory A. Beamer\)

The first suggestion is to make sure your system date is correct, as this
causes CDO problems. This may or may not iron out all of your issues.

My second suggestion is to forgo CDO altogether. There is a great open
source .NET mail component called OpenSmtp on sourceforge.net. We did have
to change HELO to EHLO on one of our projects to get mail relaying outside
the domain (more a network admin power play than anything else). This was a
simple matter of finding the line in source that has HELO and changing to
EHLO. Everything worked great after that.

OpenSmtp allows you to set up authentication rather easily. Best to have the
network admins create an account for sending email that is restricted from
doing other things in the domain as it reduces any potential security risk.
You will need them to help set up the proper relay for your SMTP service to
Exchange (et al), if you are relaying in this manner, so they can be a great
resource for you.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
Pauravi said:
Hi,

I am making a project that sends emails.I m using System.Web.Mail and
smtpMail.Send() to send emails.
i have set my SmtpMail.SmtpServer to my remote server

The problem is,
I m not able to send emails outside of my domain that is to hotmail ,yahoo
or indiatimes,etc.But i m able to send thru Outlook Express that configured
with this smtp server.
 
C

Chad Z. Hower aka Kudzu

Cowboy \(Gregory A. Beamer\) said:
The first suggestion is to make sure your system date is correct, as
this causes CDO problems. This may or may not iron out all of your
issues.

And not all systems have CDO.

You might also check out Indy. It has full SMTP support, including EHLO,
ESMTP, and many auth types including Login, Cram MD5, and more.

http://www.indyproject.org/indy.html

Its free.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"


ELKNews - Get your free copy at http://www.atozedsoftware.com
 
G

Guest

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: 500 Unauthorized relay msg rejected.
 
C

Chad Z. Hower aka Kudzu

=?Utf-8?B?UGF1cmF2aQ==?= said:
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: 500
Unauthorized relay msg rejected.

Yes. This is spam protection as I said before. You NEED to authenticate
agains the SMTP server. The server is rejecting your message because it is
not for a local recipient, and it does not know who you are as a sender.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top