473,461 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem with Sending Email outside of Domain

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.
Nov 18 '05 #1
5 1936
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" <an*******@discussions.microsoft.com> wrote in message
news:00**********************************@microsof t.com...
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.
Also my server requires Authentication?How to go about it in my project?

Please help me to solve this problem.

Nov 18 '05 #2
"=?Utf-8?B?UGF1cmF2aQ==?=" <an*******@discussions.microsoft.com> wrote in
news:00**********************************@microsof t.com:
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.


What errors do you have?
--
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

Nov 18 '05 #3
"Cowboy \(Gregory A. Beamer\)" <No************@comcast.netNoSpamM> wrote
in news:e2**************@TK2MSFTNGP11.phx.gbl:
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

Nov 18 '05 #4
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.
Nov 18 '05 #5
"=?Utf-8?B?UGF1cmF2aQ==?=" <an*******@discussions.microsoft.com> wrote in
news:D9**********************************@microsof t.com:
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.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Brett | last post by:
Can someone explain why the following doesn't work? <% sch = "http://schemas.microsoft.com/cdo/configuration/" Set cdoConfig = CreateObject("CDO.Configuration") With cdoConfig.Fields ...
2
by: Elliot | last post by:
The following code works when sending to an email address that resides on our Exchange domain. However, when trying to send to an External domain it does not work. The folling is the "doesn't work"...
1
by: Bob | last post by:
I am having a strange problem; I am hoping someone can help me. I am sending email through my vb.net program using the cdo model with this code: Dim objMail As New CDO.Message ' Send the mail...
6
by: Mike the Canadian | last post by:
I am having a very strange problem sending email with php. I have two domains. I can send an email to one domain using php but not the other. If I put both email addresses in the mail command only...
4
by: barry | last post by:
Hi I a developing on a Windows 2003 Server environment with MS Exchange 2003 installed, using the following code i am able to send e-mail message to Administrator@myserver.com but not to any...
3
by: Calvin KD | last post by:
Does anyone knows of any issues/problems associated with sending xml file via https? I have a button which exports data records using DataSet.GetXML() method and sending it over the https and...
3
by: UJ | last post by:
I'm way out of my league here but I'm having problems sending e-mails programmatically. I have a web app that will allow users to have e-mail sent to them (forgotten password/resetting password,...
1
by: Benedict Verheyen | last post by:
Hi, i get an "Unable to relay for" when trying to send an email from within my network to an email address not on my domain. I don't understand why it says "relaying" as i'm sending from an...
3
by: shansivamani | last post by:
using SMTP to send email. is there any settings need to be configured apart from Host name and Port, while sending emails using SMTPClient in .Net? when i try to send mail to ids which has only...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.