aspNetEmail component relay problem

Discussion in 'ASP.NET / ASP.NET Core' started by nfavery, Nov 23, 2005.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. I need to be send error messages to myself (webmaster) for this website via aspNetEmail under ASP.NET 1.1

    I keep getting error 550 5.7.1 Unable to relay for [email protected] ] Verify you can send email on behalf of '[email protected]'

    I've tried using the Username and Password options to no avail.
    I've also tried using localhost to test it from my PC without success.

    Code follows:

    try
    {
    aspNetEmail.EmailMessage mail = new aspNetEmail.EmailMessage();
    mail.To = '[email protected]';
    mail.From = EmailFrom.Text;
    mail.Subject = 'Inquiry from ' + MsgFrom.Text;
    mail.Body = MsgToRSVP.Text;
    mail.Server = 'mail.rsvppllc.com';
    mail.BodyFormat = aspNetEmail.MailFormat.Html;
    mail.Send();
    }
    catch(Exception ex )
    {
    aspNetEmail.EmailMessage ErrorMsg = new aspNetEmail.EmailMessage(true, false);
    ErrorMsg.To = '[email protected]';
    ErrorMsg.FromAddress = '[email protected]';
    ErrorMsg.From = 'Error on Contact_RSVP';
    ErrorMsg.Subject = 'Error during send of RSVP Contact page';
    /// ErrorMsg.Server = 'mail.rsvppllc.com';
    ErrorMsg.Server = 'localhost';
    ErrorMsg.FormatException( aspNetEmail.MailFormat.Html, ex, true, true, aspNetEmail.ServerErrorSection.All);
    }

    Post Edited (nfavery) : 11/23/2005 3:52:49 PM GMT
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    change this line

    mail.Server = 'mail.rsvppllc.com';

    to

    mail.Server = 'localhost';

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. I've uploaded my page and changed the assembly to point to the 3.0.0.0 version.
    I've changed the e-mail server to point to 'localhost'
    Now, when I click Submit, nothing happens. The mail is not sent, nor is the error e-mail sent.

    Shoule the appSettings be
    <add key='aspNetEmail.EmailMessage.Server' value='localhost'/>
    or <add key='aspNetEmail.EmailMessage.Server' value='mail.sitename.com'/>
     
  4. Bruce

    Bruce DiscountASP.NET Staff

    You should use this

    <add key='aspNetEmail.EmailMessage.Server' value='localhost'/>

    Bruce

    DiscountASP.NET
    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