SmtpMail.Send no longer works with Email v2.0

Discussion in 'ASP.NET 2.0' started by RaptorDev, Aug 11, 2006.

  1. I knew this would happen sooner or later. I'm just having troubles figuring out how to change my code so that the part of my site that emails users will start working again. I'm using both ASP.NET 1.1 and 2.0 for different clients that have sites on DiscountASP. I would have thought that even if the STMP authorization is required my code would work because it's coming from within the DiscountASP domain.

    The line of code that blows up is:

    SmtpMail.SmtpServer = ConfigurationSettings.AppSettings('MailingServer')
    SmtpMail.Send(mailMsg)

    I have the new smtp.xxclientsdomainxx.com server name set up in my web.config in the MailingServer key.

    I get 'relaying denied from your location'. Am I up a creek? Many of my clients site applications have emailers to confirm user actions. Please tell me that I can still do this. Oh, and if you say it's still possible, how about pointing me to the VB.NET/C# reference.

    Thanks.
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    No.. The email migration only affects desktop client configurations.

    You should configured your web application to send using "localhost"

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Thank you! Thank you! Thank you! That is now working. I appreciate your help.
     

Share This Page