Send mail error

Discussion in 'ASP .Net' started by Patrick Hill, Aug 19, 2003.

  1. Patrick Hill

    Patrick Hill Guest

    Hello,
    I have a web form that is a email page. When the user fills out the form and
    clicks send there is a "The server rejected one or more recipient addresses.
    The server response was: 550 5.7.1 Unable to relay for "
    error. here is the code:
    Dim msgMail As New MailMessage

    msgMail.To = ""

    msgMail.From = TextBox1.Text

    msgMail.Subject = TextBox2.Text

    msgMail.Body = TextBox3.Text

    'SmtpMail.Send(msgMail.From.ToString, msgMail.To.ToString,
    msgMail.Subject.ToString, msgMail.Body.ToString)

    SmtpMail.SmtpServer="daMachine"

    SmtpMail.Send(msgMail)



    Now my SMTP server is the Virtual SMTP server that comes with iis is that
    the problem? Do I have to set anything else up in IIS? What do I have to
    do to get this puppy to work? Thanks
     
    Patrick Hill, Aug 19, 2003
    #1
    1. Advertising

  2. you can setting the value of smtpserver to "" this works as well or
    "localhost"
    Also make sure that your SMTP server is forwarding to your ISP SMTP Server

    If you open the Internet Services Manager
    (the IIS admin app) and view the properties
    of the SMTP Server, Click on the Delivery tab, then the advanced
    button, fill in the hostname of your mail
    router/SMTP server in the "Smart Host" field.
    like
    smtp.yourISPmailServer.com
    or
    mail.yourISPmailServer.com
    or
    mail.yoursmtpserver.com
    or
    IP address
    or what ever.

    or directly set your SmtpServer = "mail.yoursmptserveratyourisp.com"
    try different ways.




    "Patrick Hill" <> wrote in message
    news:...
    > Hello,
    > I have a web form that is a email page. When the user fills out the form

    and
    > clicks send there is a "The server rejected one or more recipient

    addresses.
    > The server response was: 550 5.7.1 Unable to relay for

    "
    > error. here is the code:
    > Dim msgMail As New MailMessage
    >
    > msgMail.To = ""
    >
    > msgMail.From = TextBox1.Text
    >
    > msgMail.Subject = TextBox2.Text
    >
    > msgMail.Body = TextBox3.Text
    >
    > 'SmtpMail.Send(msgMail.From.ToString, msgMail.To.ToString,
    > msgMail.Subject.ToString, msgMail.Body.ToString)
    >
    > SmtpMail.SmtpServer="daMachine"
    >
    > SmtpMail.Send(msgMail)
    >
    >
    >
    > Now my SMTP server is the Virtual SMTP server that comes with iis is that
    > the problem? Do I have to set anything else up in IIS? What do I have to
    > do to get this puppy to work? Thanks
    >
    >
     
    MS News \(MS ILM\), Aug 19, 2003
    #2
    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. Nathan Sokalski
    Replies:
    3
    Views:
    1,953
    Larry Lard
    Nov 23, 2005
  2. =?Utf-8?B?Unlhbg==?=
    Replies:
    2
    Views:
    3,913
    Steven Cheng[MSFT]
    Feb 28, 2006
  3. refv8
    Replies:
    2
    Views:
    27,094
    ittower
    Oct 13, 2006
  4. radgey gadgey hl
    Replies:
    0
    Views:
    717
    radgey gadgey hl
    Nov 25, 2007
  5. 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
Loading...

Share This Page