e-mail's from asp.net

Discussion in 'ASP.NET / ASP.NET Core' started by Bruce, Sep 14, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Bruce

    Bruce DiscountASP.NET Staff

    Your code looks fine to me.

    Do you get any error message?


    quote:Originally posted by rahulbhot

    i used system.web.mail to send automated e-mail's from my website
    i debuged the code , configured the mail server .
    still mail's are not sent
    what else should i try
    please review the code below:

    Dim objMM As New MailMessage

    objMM.To = "[email protected]"
    objMM.From = "[email protected]"


    objMM.BodyFormat = MailFormat.Text

    objMM.Priority = MailPriority.Normal

    objMM.Subject = "Hello there!"

    objMM.Body = "Hi!" & vbCrLf & vbCrLf &
    "How are you doing?"

    SmtpMail.SmtpServer = "localhost"

    'tried changing SmtpMail.SmtpServer to local IP


    SmtpMail.Send(objMM)



    R.B.
    </blockquote id="quote"></font id="quote">

    B.

    DiscountASP.NET
    http://www.DiscountASP.NET
     
  2. i used system.web.mail to send automated e-mail's from my website
    i debuged the code , configured the mail server .
    still mail's are not sent
    what else should i try
    please review the code below:

    Dim objMM As New MailMessage

    objMM.To = "[email protected]"
    objMM.From = "[email protected]"


    objMM.BodyFormat = MailFormat.Text

    objMM.Priority = MailPriority.Normal

    objMM.Subject = "Hello there!"

    objMM.Body = "Hi!" & vbCrLf & vbCrLf &
    "How are you doing?"

    SmtpMail.SmtpServer = "localhost"

    'tried changing SmtpMail.SmtpServer to local IP


    SmtpMail.Send(objMM)



    R.B.
     
  3. Looks to me like "localhost" is the wrong answer. My set-up has the web server running on a different machine than the mail server. e.g. www.xxx.com != mail.xxx.com

    David
     
  4. And if that is not it, than it is probably that "yyy.com" is not authorized to relay through the local smtp server. Look into configuring the local smtp server to open that up.

    David
     
  5. Bruce

    Bruce DiscountASP.NET Staff

    Localhost is the SMTP host you should use for web application hosted on our server.

    quote:Originally posted by goinggoneco

    And if that is not it, than it is probably that "yyy.com" is not authorized to relay through the local smtp server. Look into configuring the local smtp server to open that up.

    David
    </blockquote id="quote"></font id="quote">

    B.

    DiscountASP.NET
    http://www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page