Email problems

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.
9/20/2010 9:54:16 AM
Gravatar
Total Posts 251

Email problems

Until yesterday i had a mail server on my server, then I decided to switch to Google apps.

From then, troubles has begun to appear.

I replaced my localhost information in web.config with this:

<add key="EnableSiteSettingsSmtpSettings" value="false"/>
<add key="MaskSmtpPasswordInSiteSettings" value="false"/>
<add key="DisableDotNetOpenMail" value="true"/>
<add key="SMTPServer" value="smtp.gmail.com"/>
<add key="SMTPRequiresAuthentication" value="true"/>
<add key="SMTPUseSsl" value="true"/>
<add key="SMTPPort" value="587"/>
<add key="SMTPUser" value="***"/>
<add key="SMTPPassword" value="***"/>
<add key="SMTPTimeoutInMilliseconds" value="30000"/>

everything seems to work, but does not send anything (and no messages on the system log)

then, i disabled dotnetopenmail, and i get an error 500 and this cryptic line in the system log:

504 Unrecognized authentication type

I enabled the SiteSettingsSmtpSettings, and i inputted the internal ip address of an email server that is running on a vm on the server (telnetting that address on port 25 works, and can send email)

when commenting a blog entry, i receive the notification. it works! i thought.

Then i tried to recover the password of a bogus user that i created for testing purposes, but i get this error:

2010-09-20 16:44:34,793 ERROR mojoPortal.Web.UI.Pages.RecoverPassword - unable to send password recovery email. Please check the system.net MailSettings section in web.config
System.Net.Mail.SmtpException: Error during email send. ---> System.Net.WebException: Impossible connect to the remote computer. ---> System.Net.Sockets.SocketException: Impossible to connnect. The destination computer has refused the connection: 127.0.0.1:25
   in System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   in System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
   --- Fine della traccia dello stack dell'eccezione interna ---
   in System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout)
   in System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback)
   in System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback)
   in System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
   in System.Net.Mail.SmtpConnection.GetConnection(ServicePoint servicePoint)
   in System.Net.Mail.SmtpClient.Send(MailMessage message)
   --- Fine della traccia dello stack dell'eccezione interna ---
   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)

Why it is connecting on localhost??? And only when recovering the password? I cannot understand this

9/20/2010 9:57:03 AM
Gravatar
Total Posts 18439

Re: Email problems

Its because certain built in ASP.NET features like password recovery don't use those settings but the ones in the <system.net><mailsettings section

http://www.mojoportal.com/emailconfiguration.aspx

Best,

Joe

9/20/2010 10:02:20 AM
Gravatar
Total Posts 251

Re: Email problems

Oh, again i missed to read the relevant bit of information! Sorry...

And it was also easy to find, in the web.config, just one row below my cursor...:

<!-- ******* email settings
    Note you also need to specify smtp settings further below in system.net section the settings here appply to features but
    the settings in the system.net.mailsettigns section are used by site registration and password recovery -->

ps: can i configure it to work with gmail? it looks like there is no setting for ssl support

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