Relay Error in Send Mail in 2.0

Discussion in 'ASP .Net' started by rose, Mar 31, 2008.

  1. rose

    rose Guest

    Hi everyone,

    I am trying to send mail to external domains like gmail,hotmail via my
    local network exchange server. The code works in .net 1.1 with the
    User name and password [user created with full rights on the Exchange
    server] provided by the Network admin to me.

    Although, I still couldnt figure out the fact that if I send emails to
    external domain through outlook which is configured to the same
    exchange server, there isnt any problem. But when I did that through
    my code, it threw our very own 550 5.7.1 relay error. Thankfully, the
    problem in .net 1.1 is solved.

    Now, using the same credentials, I want to send the mails through 2.0
    but I get the same error.i have tried all the solutions I could find
    on the net but in vain. With local host it doesnt throw an error but
    the mail ends up in Badmail. Besides I want to use exchange server but
    that too isnt working. There isnt any firewall issue. If there was,
    then the mail in 1.1 shouldnt be working on the same machine using
    same parameters and it doesnt have SSL authentication.

    SmtpClient client = new SmtpClient();
    client.Host = "localhost"; //If i specify my exchange
    server here, it throws an error
    client.Port = 25;
    client.Credentials = new
    System.Net.NetworkCredential("username", "pass");

    I really cant understand what the problem is so please any help will
    be highly appreciated :)
    Thanks
     
    rose, Mar 31, 2008
    #1
    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. Jinsong Liu
    Replies:
    2
    Views:
    408
    Jinsong Liu
    Sep 10, 2004
  2. Chris Thunell

    unable to relay with vb.net system.mail

    Chris Thunell, Dec 9, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    4,346
    Jeffrey Palermo [MCP]
    Dec 10, 2004
  3. Don Quijote de Nicaragua

    Error + Send Mail + ERROR: Failure sending mail.

    Don Quijote de Nicaragua, Jun 26, 2008, in forum: ASP .Net
    Replies:
    5
    Views:
    1,521
    Don Quijote de Nicaragua
    Jun 26, 2008
  4. Prashanth
    Replies:
    2
    Views:
    217
    Prashanth
    Aug 12, 2003
  5. Tim::..

    HELP.. ERROR: Unable to relay for

    Tim::.., Jun 22, 2004, in forum: ASP General
    Replies:
    2
    Views:
    363
    Chris Barber
    Jun 23, 2004
Loading...

Share This Page