System.Net.Mail.SmtpClient

Discussion in 'ASP .Net' started by Guest, Sep 15, 2006.

  1. Guest

    Guest Guest

    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!
    Guest, Sep 15, 2006
    #1
    1. Advertising

  2. How do you have the Recipient MailAddress setup? Are you using
    l or

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

    am 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!
    Sean Chambers, Sep 15, 2006
    #2
    1. Advertising

  3. Guest

    Guest Guest

    For the recipient mailaddress I am using

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

    What could be causing this?

    "Sean Chambers" <> wrote in message
    news:...
    > How do you have the Recipient MailAddress setup? Are you using
    > l or
    >
    > Sounds like an issue with formatting the address correctly, and now
    > with SmtpClient
    >
    > am 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!

    >
    Guest, Sep 15, 2006
    #3
  4. Guest

    sloan Guest

    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.




    <> wrote in message
    news:%...
    > For the recipient mailaddress I am using
    >
    > If I change the SMTPServer on the SMTPClient to another smtp server,
    > everything works fine.
    >
    > What could be causing this?
    >
    > "Sean Chambers" <> wrote in message
    > news:...
    > > How do you have the Recipient MailAddress setup? Are you using
    > > l or
    > >
    > > Sounds like an issue with formatting the address correctly, and now
    > > with SmtpClient
    > >
    > > am 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!

    > >

    >
    >
    sloan, Sep 15, 2006
    #4
  5. 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("","");
    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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.

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



    This posting is provided "AS IS" with no warranties, and confers no rights.
    Steven Cheng[MSFT], Sep 18, 2006
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?SG90UVE=?=
    Replies:
    0
    Views:
    3,293
    =?Utf-8?B?SG90UVE=?=
    May 6, 2005
  2. Replies:
    3
    Views:
    1,160
  3. mazdotnet

    ASP 2.0 Net.Mail.SmtpClient Delay

    mazdotnet, May 9, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    6,263
    sloan
    May 9, 2006
  4. =?Utf-8?B?QnJpYW4gTG9ycmFpbmU=?=

    Mail.SmtpClient sending duplicates

    =?Utf-8?B?QnJpYW4gTG9ycmFpbmU=?=, Jun 13, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    1,150
    vMike
    Jun 14, 2006
  5. refv8
    Replies:
    2
    Views:
    27,012
    ittower
    Oct 13, 2006
Loading...

Share This Page