Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an asp.net 4.0 website (IIS7.5) and I'm using the PasswordRecovery control for a forgot password form. When I run the site locally it works fine, emails are sent. However, when I run the site from my vps (also IIS7.5), I get an error message when trying to send the email. There's nothing in the server's event log.

My PasswordRecovery aspx code is as follows:

 <asp:PasswordRecovery ID="PasswordRecovery1" runat="server"       
            CssClass="mediumText">
            <MailDefinition From="noreply@x.com"   BodyFileName="~/EmailTemplates/PasswordRecovery.txt" />

My web.config mail settings are as follows:

<system.net>
    <mailSettings>
      <smtp from="noreply@x.com">
        <network host="smtp.123-reg.co.uk" password="x" userName="x" />
      </smtp>
    </mailSettings>

I can confirm that I'm able to ping smtp.123-reg.co.uk from the server. I know the username and password are correct because the same config file works when I run the website on my laptop.

Any ideas?

share|improve this question
    
Is your VPS host blocking port 25? Can you telnet smtp.123-reg.co.uk 25 and reach the SMTP server? –  ITHedgeHog Feb 13 '12 at 11:37
    
Reality check - you talk a lot about waht does not work, but you do not tll us the error message you get... which likely contains the expkllanation of your problem. In clear text. Please add the error you get. –  TomTom Feb 13 '12 at 12:03
add comment

1 Answer

Problem was due to firewall access to the smtp server. Work-around was to configure local host as an smtp server

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.