Password Recovery Mail Error

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
3/4/2014 11:05:59 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Password Recovery Mail Error

Hi Joe,

an end user notified me that the Password Recovery Mail did not work anymore for a site.
Version 2.3.9.9 MSSQL
Microsoft Windows NT 6.0.6002 Service Pack 2
ASP.NET v4.0.30319 'Full Trust'

This is the error logged:
2014-03-04 16:06:12,026 ERROR (null) - (null) - (null) - mojoPortal.Web.UI.Pages.RecoverPassword - unable to send password recovery email. Please check the system.net MailSettings section in web.config
System.InvalidOperationException: Host SMTP non specificato.
   in System.Net.Mail.SmtpClient.CheckHostAndPort()
   in System.Net.Mail.SmtpClient.Send(MailMessage message)
   in System.Web.UI.WebControls.LoginUtil.SendPasswordMail(String email, String userName, String password, MailDefinition mailDefinition, String defaultSubject, String defaultBody, OnSendingMailDelegate onSendingMailDelegate, OnSendMailErrorDelegate onSendMailErrorDelegate, Control owner)

I thought that the old mailing settings were dismissed therefore I tested the new user registration mail (same settings ?) but this feature works fine!
The error is replicated on another site with same server, version, and mail settings.
Both sites use a mail server that requires a custom virtual port "7425".
The Mail server and the mail account are working.
For both sites all other mojoPortal mail featuires are regularily working.

Then I tested another site with same version but hosted on a Partial Trust web server and it worked fine.
Version 2.3.9.9 MSSQL
Microsoft Windows NT 6.1.7601 Service Pack 1
ASP.NET v4.0.30319 'Partial Trust'


Just to be sure I finally reset in section <system.net> of web.config the old settings for the two malfunctioning sites
  <!--
  <system.net>
    <mailSettings>
      <smtp from="noreply@yourdomain.com">
        <network host="localhost" port="7425" password="" userName="noreply@yourdomain.com"/>
      </smtp>
    </mailSettings>
  </system.net>
  -->
The Password Recovery Mail was finally delivered, as the old setting were still required.

Now, I am confused....
The only combination of elements where the Password Recovery Mail triggers the error seems to be
Version 2.3.9.9 Full Trust
Microsoft Windows NT 6.0.6002 Service Pack 2
Mail server requiring a virtual port setting

Could you tell if, for any reasons, in spite the comment <!-- this isn't used anymore for anything the only smtp settings used are in the appSettings section so you can move them to user.config --> , the password recovery system in version 2.3.9.9 is still requiring the old web.confing settings in section <system.net> ?

What els could I check ?

Any changes in version 2.4.0.2 that reccommends to upgrade ?

Thanks

Diego

3/4/2014 12:47:33 PM
Gravatar
Total Posts 18439

Re: Password Recovery Mail Error

Hi Diego,

It isn't used but it cannot be commented out, there must be some setting there to prevent an error but the setting there does not have to be correct, the settings used come from <appSettings/user.config

The asp.net password recovery would normally use the <system.net settings but at the last second before the message is sent we change the settings so it uses the ones from <appSettings. But if the system.net settings are missing an error will happen before we even get a chance to change the settings, therefore something must be there uncommented but the settings there don't have to be correct.

Hope that helps,

Joe

3/5/2014 1:19:46 AM
Gravatar
Total Posts 149
Partner
mojoPortal Skinning, Custom Development and Support in Italy?
EffectiveWeb.it

Re: Password Recovery Mail Error

Hi Joe,

I double checked the web.config and restored the original version (with the commented syspem.net settings).

  <!-- this isn't used anymore for anything the only smtp settings used are in the <appSettings section so you can move them to user.config -->
  <!--
  <system.net>
    <mailSettings>
      <smtp from="noreply@yourdomain.com">
        <network host="localhost" port="25" password="" userName="noreply@yourdomain.com"/>
      </smtp>
    </mailSettings>
  </system.net>
  -->
 

Then I carefully checked the user.config settings, compare to those of a workingsite and I found and commented-out the following setting:

<!-- <add key="DisableDotNetOpenMail" value="false" /> -->

 

Now, it finally works!

Thanks

Diego

You must sign in to post in the forums. This thread is closed to new posts.