Password Reset SMTP server could not send the message

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
10/12/2013 4:07:12 PM
Gravatar
Total Posts 220

Password Reset SMTP server could not send the message

Hi Joe,

I click the "Forgot Password?" and get the message:
"Sorry, your password could not be sent because the server could not send the message. Please try again in a few minutes ..."
But apart from that the SMTP server is operating properly with mojo, I can send messages to me using the contact form.

Best
Matthias

10/13/2013 5:39:49 AM
Gravatar
Total Posts 220

Re: Password Reset SMTP server could not send the message

P.S.:

I have tested it with an external SMTP server. This server run all of my own emails. The same. I receive posted messages from contact form, but from the "forgot password?" link  I get the message: "Sorry, your password could not be sent ..."

System Log:

2013-10-13 12:44:22,363 ERROR 93.128.244.63 - de-DE - /Secure/RecoverPassword.aspx - mojoPortal.Web.UI.Pages.RecoverPassword - unable to send password recovery email. Please check the system.net MailSettings section in web.config
System.InvalidOperationException: The SMTP host was not specified.
   at System.Net.Mail.SmtpClient.CheckHostAndPort()
   at System.Net.Mail.SmtpClient.Send(MailMessage message)
   at System.Web.UI.WebControls.LoginUtil.SendPasswordMail(String email, String userName, String password, MailDefinition mailDefinition, String defaultSubject, String defaultBody, OnSendingMailDelegate onSendingMailDelegate, OnSendMailErrorDelegate onSendMailErrorDelegate, Control owner)

In my user.config:

  <add key="DisableDotNetOpenMail" value="false" />
  <add key="SMTPServer" value="smtp.1und1.de" />
  <add key="SMTPRequiresAuthentication" value="true" />
  <add key="SMTPUseSsl" value="false" />
  <add key="SMTPPort" value="25" />
  <add key="SMTPUser" value="myalias@something.de" />
  <add key="SMTPPassword" value="mypassword" />
  <add key="SMTPTimeoutInMilliseconds" value="15000" />

10/13/2013 9:09:54 AM
Gravatar
Total Posts 18439

Re: Password Reset SMTP server could not send the message

Hi Matthias,

What version of mojoPortal?

Very old versions of mojoPortal used the <system.net section smtp settings in Web.config for password recovery but newer versions use the user.config settings. 

Unless you have this as true:

<add key="EnableSiteSettingsSmtpSettings" value="true" />

if that is true then it ignores other user.config settings and smtp settings come from the Site Settings page, so you may need to check there.

Hope that helps,

Joe

 

10/13/2013 9:30:46 AM
Gravatar
Total Posts 220

Re: Password Reset SMTP server could not send the message

Hi Joe,

thanks for response.
The site is 2.3.9.9 (4) and <add key="EnableSiteSettingsSmtpSettings" value="false" />

Best
Matthias

10/13/2013 10:12:38 AM
Gravatar
Total Posts 18439

Re: Password Reset SMTP server could not send the message

Hi Matthias,

Can you try un-commenting the <system.net section in web.config?

Best,

Joe

10/13/2013 11:02:35 AM
Gravatar
Total Posts 220

Re: Password Reset SMTP server could not send the message

Hi Joe,

That was it! Thank you. Time for a coffee :-)
Can you please tell me what I need to do to make the German umlauts are written properly in the email? Could be useful if the password has any.
Best
Matthias

10/13/2013 11:54:40 AM
Gravatar
Total Posts 18439

Re: Password Reset SMTP server could not send the message

Hi Matthias,

Thanks for the coffee! as always

You can try setting utf-8 encoding for email 

<add key="SmtpPreferredEncoding" value="utf-8" />

That might solve the problem.

Hope that helps,

Joe

10/13/2013 12:56:59 PM
Gravatar
Total Posts 220

Re: Password Reset SMTP server could not send the message

Unfortunately, not: "Ihr Passwort f�r die Anmeldung ..."

I insert utf-8 here:

<!-- Leave this blank for ASCII encoding. Allowed values are utf-8, utf-32, and unicode -->
<add key="SmtpPreferredEncoding" value="utf-8" />

I tried it also in the user.config but without success.

 

Best
Matthias

10/13/2013 2:15:01 PM
Gravatar
Total Posts 18439

Re: Password Reset SMTP server could not send the message

try x-IA5-German instead of utf-8

10/13/2013 2:28:02 PM
Gravatar
Total Posts 18439

Re: Password Reset SMTP server could not send the message

also are you forcing the site to use German

10/14/2013 2:14:43 AM
Gravatar
Total Posts 220

Re: Password Reset SMTP server could not send the message

Hi Joe,

I replaced utf-8 by x-IA5-German and in my user.config I have
<add key="UseCultureOverride" value="true" />
<add key="site1culture" value="de-DE" />
but Mojo is stubborn. It don't like the umlauts  smiley

Best
Matthias

10/14/2013 6:46:12 AM
Gravatar
Total Posts 18439

Re: Password Reset SMTP server could not send the message

Hi Matthias,

I have found that the file

/Data/MessageTemplates/de-DE-PasswordEmailMessage.config is ANSI encoded. Maybe that causes a problem when it tries to replace the token in that file with the user password.

I have emailed you a replacement file that is utf-8 encoded. Maybe that will solve it.

Do umlauts work in the contact form email? 

Best,

Joe

10/15/2013 7:48:13 AM
Gravatar
Total Posts 220

Re: Password Reset SMTP server could not send the message

Hi Joe,

yes, the umlauts work in the contact form, only: matthias?myemail.de
but it's not that important I think.

The changed de-DE-PasswordEmailMessage.config is a complete success smiley

Thanks and cheers
Matthias
 

10/15/2013 2:10:51 PM
Gravatar
Total Posts 18439

Re: Password Reset SMTP server could not send the message

Hi Matthias,

I'm glad to hear that! I have committed the change to fix that encoding in our source code repository to make sure it will stay fixed after future upgrades.

Thanks as always for the beer and coffee!

Cheers,

Joe

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