473,385 Members | 1,256 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

MailMessage() and relay

JP
I have been at odds with our network guy over an application that is designed
to send alert emails to accounts outside of our domain to users. The issue is
the mail server is not set for "open relay" so any Mail.Send() that is to an
account outside of our domain server gets rejected by the SMTP. Any accounts
inside the domain get sent properly.

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 5.7.1 Unable to relay for my*******@otherdomain.com

My network guy says the relay should be necessary as long as I am
authenticating to the SMTP. But the there lies the problem, I am
authenticating: (obviously I’ve changed the parameters values here for
security reasons)

MailMessage mailMsg = new MailMessage();
SmtpMail.SmtpServer="mail.ourdomain.com";
mailMsg.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] ="1";
mailMsg.Fields["http://schemas.microsoft.com/cdo/configuration/sendusername"] ="domain/username";
mailMsg.Fields["http://schemas.microsoft.com/cdo/configuration/sendpassword"] ="password";

So what should I be doing in this situation? I understand that open relay is
what spammers can typically use. I am passing the authentication to the
server so why is .NET telling me that it can’t relay the message outside of
our domain? Can you sent relay on a specific account?

--
JP
..NET Software Developer

Aug 29 '05 #1
0 1311

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

Similar topics

3
by: Mike P | last post by:
Can the MailMessage class be used to send emails from a machine that has no email account (such as Outlook)? Mike *** Sent via Developersdex http://www.developersdex.com *** Don't just...
4
by: Mark Rae | last post by:
Hi, Can anyone please tell me if it's possible to pass a System.Web.Mail.MailMessage object to a ASP.NET Web Service? Maybe using XML Serialization / Deserialization? I've been asked to...
6
by: Frank | last post by:
Straightforward VB.NET 2002 code that works form both Windows and ASP.NET apps on a Windows 2000 machine, and works in the Windows app on a newly installed XP machine, but fails in the ASP.NET...
0
by: Stewart | last post by:
Hi, I have a program which needs to send individual (customized) emails to a few thousand recipients. Using the standard approach SmtpMail/MailMessage method and Win 2000 server (SMTP service...
5
by: martin | last post by:
Hi, I have created a class that is totally seperate from my web application. However this class is used extensivly by the web application for stuff like data access. I wish to add a function to...
4
by: Aren Cambre | last post by:
Why does SmtpMail.Send throw an exception if the MailMessage's BodyFormat = MailFormat.Html? I've searched all over the place and cannot find a solution anywhere. I am running this on Windows XP...
0
by: JP | last post by:
I have been at odds with our network guy over an application that is designed to send alert emails to accounts outside of our domain to users. The issue is the mail server is not set for "open...
1
by: asnowfall | last post by:
I am creating MailMessage out of already existing email message. My existing message has few custom properties. I wan to add them to System.Net.Mail.MailMessage How to add custom properties? ...
1
by: tshad | last post by:
I have a W2K3 Server we are setting up to run a Windows Service for a client at their location. I don't want this machine to go through exchange or their local mail server, I just want the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

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.