473,396 Members | 1,775 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,396 software developers and data experts.

System.Net.Mail.SmtpClient

Hi all,

We are using the Asp.Net SMTP Client to send email via our Exchange 2003 SP2
Server. When trying to send email to a local recipient I am getting the
following error:-

Server: 172.19.2.21. Message: Mailbox unavailable. The server response was:
5.7.1 Requested action not taken: message refused
What is causing this? The asp.net machine is on the same LAN as the Exchange
Server. I checked the Exchange Server and all local IPs are in the "allow"
list.

TIA!
Sep 15 '06 #1
4 6418
How do you have the Recipient MailAddress setup? Are you using
na**@domain.local or na**@domain.com

Sounds like an issue with formatting the address correctly, and now
with SmtpClient

pa***@community.nospam wrote:
Hi all,

We are using the Asp.Net SMTP Client to send email via our Exchange 2003 SP2
Server. When trying to send email to a local recipient I am getting the
following error:-

Server: 172.19.2.21. Message: Mailbox unavailable. The server response was:
5.7.1 Requested action not taken: message refused
What is causing this? The asp.net machine is on the same LAN as the Exchange
Server. I checked the Exchange Server and all local IPs are in the "allow"
list.

TIA!
Sep 15 '06 #2
For the recipient mailaddress I am using na**@domain.com

If I change the SMTPServer on the SMTPClient to another smtp server,
everything works fine.

What could be causing this?

"Sean Chambers" <dk****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
How do you have the Recipient MailAddress setup? Are you using
na**@domain.local or na**@domain.com

Sounds like an issue with formatting the address correctly, and now
with SmtpClient

pa***@community.nospam wrote:
>Hi all,

We are using the Asp.Net SMTP Client to send email via our Exchange 2003
SP2
Server. When trying to send email to a local recipient I am getting the
following error:-

Server: 172.19.2.21. Message: Mailbox unavailable. The server response
was:
5.7.1 Requested action not taken: message refused
What is causing this? The asp.net machine is on the same LAN as the
Exchange
Server. I checked the Exchange Server and all local IPs are in the
"allow"
list.

TIA!

Sep 15 '06 #3
I have complete 1.1 and 2.0 examples here:
http://sholliday.spaces.live.com/

2/8/2006 entry.
You need to try the different authentication modes.

Also. check C:\Inetpub\mailroot and see if they're jammed up there.


<pa***@community.nospamwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
For the recipient mailaddress I am using na**@domain.com

If I change the SMTPServer on the SMTPClient to another smtp server,
everything works fine.

What could be causing this?

"Sean Chambers" <dk****@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
How do you have the Recipient MailAddress setup? Are you using
na**@domain.local or na**@domain.com

Sounds like an issue with formatting the address correctly, and now
with SmtpClient

pa***@community.nospam wrote:
Hi all,

We are using the Asp.Net SMTP Client to send email via our Exchange
2003
SP2
Server. When trying to send email to a local recipient I am getting the
following error:-

Server: 172.19.2.21. Message: Mailbox unavailable. The server response
was:
5.7.1 Requested action not taken: message refused
What is causing this? The asp.net machine is on the same LAN as the
Exchange
Server. I checked the Exchange Server and all local IPs are in the
"allow"
list.

TIA!


Sep 15 '06 #4
Hello Param,

As for the send mail code, are you using the "Network" as the SmtpClient's
"SmtpDeliveryMethod" and have you tried supply a credential or use the
default credential. Also, when using Exchange server in a domain
environment, you should make sure you have permission to send mail as the
"From" address since exchange server will validate this at server-side.

In addition, as you mentioned it works when using another SMTP server, is
that SMTP server a normal SMTP relay server which also transfer message to
another exchange server? If possible you can also create a local
smtpserver through IIS which act as a relay server to the Exchange server
and send mail through this local SMTP server to see whether it works.

So far based on my experience, it is likely a server environment specific
issue. Here is a simple code snippet which works for sending mail to local
domain user through local network exchange server:

==========================
private void btnSend_Click(object sender, EventArgs e)
{
MailMessage msg = new
MailMessage("st****@microsoft.com","st****@microso ft.com");
msg.Subject = "Smtp Client Test Message";
msg.IsBodyHtml = true;
msg.Body = "<font size='30'>Hello World</font>";

SmtpClient sc = new SmtpClient("smtphost");

sc.DeliveryMethod = SmtpDeliveryMethod.Network;

sc.UseDefaultCredentials = true;

sc.Send(msg);

}
===========================

Please feel free to post here if you have any other finding or any other
questions on this.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Sep 18 '06 #5

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

Similar topics

3
by: HoustonComputerGuy | last post by:
I am working on getting my web applications moved to .Net 2.0 and am having some problems with System.Net.Mail. I get the following error when sending the mail: System.Net.Mail.SmtpException was...
1
by: Eric Sheu | last post by:
Greetings, I have been searching the web like mad for a solution to my SMTP problem. I am using Windows Server 2003 and ASP.NET 2.0 w/ C# to send out e-mails from a web site I have created to...
2
by: Alex Maghen | last post by:
I want to use the new System.Net.Mail instead of the old System.Web.Mail. I'm getting an error "Hot not specified" when I try to do my last two lines: System.Net.Mail.SmtpClient SMTP = new...
0
by: howardr101 | last post by:
Hi, Have hunted around on the groups and can't find anything, hence. I've tried this against 2 mail servers (mailtraq and hmailserver) and it occus with both. The problems seems to be that...
2
by: Tim | last post by:
I am trying to send a simple mail message using windows forms in VB.NET 2005. When executing the code, I get a general 'Configuration system failed to initialize' error message when the code...
2
by: clevrmnkey | last post by:
I've had nothing but trouble from the System.Net.Mail objects, but I finally need to make them work, and I can't for the life of me see what I'm doing wrong. I pared back my mail transaction to...
1
by: les | last post by:
I'm getting this error "BC30456: 'IsBodyHtml' is not a member of 'System.Net.Mail.SmtpClient'" when trying to submit a form and send email. If I remove the line "MailObj.IsBodyHtml = True" the...
1
by: WIzmanG | last post by:
Hi all I am having trouble with sending email via a C#2.0 application, I use the same settings as I use in Outlook but I cannot get email to send. I am trying to use SSL on port 465 and get the...
11
by: Ed Bitzer | last post by:
I have been able using the namespace System.Web.Mail and its method Smtp.mail.send to mail simple text messages to a small group within our 55 and older community. I need help expanding the...
5
by: Henry Stock | last post by:
I am trying to understand the following error: Any thing you can tell me about this is appreciated. Security Exception Description: The application attempted to perform an operation not allowed...
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: 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...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.