Send mail error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Patrick Hill

    #1

    Send mail error

    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 PatrickHill@aol .com"
    error. here is the code:
    Dim msgMail As New MailMessage

    msgMail.To = "PatrickHill@ao l.com"

    msgMail.From = TextBox1.Text

    msgMail.Subject = TextBox2.Text

    msgMail.Body = TextBox3.Text

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

    SmtpMail.SmtpSe rver="daMachine "

    SmtpMail.Send(m sgMail)



    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\)

    #2
    Re: Send mail error

    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.yourISPmai lServer.com
    or
    mail.yourISPmai lServer.com
    or
    mail.yoursmtpse rver.com
    or
    IP address
    or what ever.

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




    "Patrick Hill" <Progman716@nos pam.aol.com> wrote in message
    news:ephDjThZDH A.384@TK2MSFTNG P12.phx.gbl...[color=blue]
    > Hello,
    > I have a web form that is a email page. When the user fills out the form[/color]
    and[color=blue]
    > clicks send there is a "The server rejected one or more recipient[/color]
    addresses.[color=blue]
    > The server response was: 550 5.7.1 Unable to relay for[/color]
    PatrickHill@aol .com"[color=blue]
    > error. here is the code:
    > Dim msgMail As New MailMessage
    >
    > msgMail.To = "PatrickHill@ao l.com"
    >
    > msgMail.From = TextBox1.Text
    >
    > msgMail.Subject = TextBox2.Text
    >
    > msgMail.Body = TextBox3.Text
    >
    > 'SmtpMail.Send( msgMail.From.To String, msgMail.To.ToSt ring,
    > msgMail.Subject .ToString, msgMail.Body.To String)
    >
    > SmtpMail.SmtpSe rver="daMachine "
    >
    > SmtpMail.Send(m sgMail)
    >
    >
    >
    > 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
    >
    >[/color]


    Comment

    • MS News \(MS ILM\)

      #3
      Re: Send mail error

      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.yourISPmai lServer.com
      or
      mail.yourISPmai lServer.com
      or
      mail.yoursmtpse rver.com
      or
      IP address
      or what ever.

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




      "Patrick Hill" <Progman716@nos pam.aol.com> wrote in message
      news:ephDjThZDH A.384@TK2MSFTNG P12.phx.gbl...[color=blue]
      > Hello,
      > I have a web form that is a email page. When the user fills out the form[/color]
      and[color=blue]
      > clicks send there is a "The server rejected one or more recipient[/color]
      addresses.[color=blue]
      > The server response was: 550 5.7.1 Unable to relay for[/color]
      PatrickHill@aol .com"[color=blue]
      > error. here is the code:
      > Dim msgMail As New MailMessage
      >
      > msgMail.To = "PatrickHill@ao l.com"
      >
      > msgMail.From = TextBox1.Text
      >
      > msgMail.Subject = TextBox2.Text
      >
      > msgMail.Body = TextBox3.Text
      >
      > 'SmtpMail.Send( msgMail.From.To String, msgMail.To.ToSt ring,
      > msgMail.Subject .ToString, msgMail.Body.To String)
      >
      > SmtpMail.SmtpSe rver="daMachine "
      >
      > SmtpMail.Send(m sgMail)
      >
      >
      >
      > 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
      >
      >[/color]


      Comment

      Working...