Email configuration - TLS support

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

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.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
10/29/2008 6:49:45 AM
Gravatar
Total Posts 88

Email configuration - TLS support

Hi Joe,

I am trying to configure my gmail account and am having big problems. I've been playing around with the settings, using a test contact form and examining the log file. I keep getting this message:

2008-10-29 11:45:06,531 [3860] ERROR mojoPortal.Web.ContactUI.ContactForm [(null)] - 530 5.7.0 Must issue a STARTTLS command first. 5sm4118631eyf.8

I have tried various combinations of Use SSL = Yes / No, Requires Authentication = Yes / No but I always get either the message above or , depending on the exact combo, 504 Authentication failed.

Does Mojoportal support TLS ?

As always, appreciate your help.
Regards,

Leah

10/29/2008 7:16:45 AM
Gravatar
Total Posts 18439

Re: Email configuration - TLS support

Hi Leah,

TLS is the same thng as SSL. I just got it to work using my gmail account, and I've updated the documentation with a Gmail example here:

Email Confguration

Best,

Joe

10/29/2008 7:28:16 AM
Gravatar
Total Posts 88

Re: Email configuration - TLS support

I've replicated yours exactly (as far as I can tell) and it still doesn't work for me. I now get this message:

2008-10-29 12:25:34,031 [3680] INFO mojoPortal.Web.Global [(null)] - Global.asax.cs Application_End
2008-10-29 12:25:40,625 [3860] INFO mojoPortal.Web.Global [(null)] - Application Started.
2008-10-29 12:25:55,125 [3860] ERROR mojoPortal.Web.ContactUI.ContactForm [(null)] - 504 Unrecognized authentication type

 

My settings are....

user.config:

<add key="SMTPServer" value="smtp.gmail.com" />
<add key="SMTPRequiresAuthentication" value="true" />
<add key="SMTPPort" value="587" />
<add key="SMTPUser" value="xxx@gmail.com" />
<add key="SMTPPassword" value="xxx" />
<add key="SMTPUseSsl" value="true" />
<add key="SMTPTimeoutInMilliseconds" value="15000" />

web.config:

<system.net>
<mailSettings>
<smtp from="xxxx@gmail.com">
<network
host="smtp.gmail.com"
port="587"
password="xxxx"
userName="xxxx@gmail.com"
/>
</smtp>
</mailSettings>
</system.net>

 

Can you spot anything ?

 

10/29/2008 7:38:26 AM
Gravatar
Total Posts 18439

Re: Email configuration - TLS support

It looks right. Are you sure the settings don't exist more than once in user.config? Settings with lower position in the file will trump settings higher in the file.

10/29/2008 8:08:09 AM
Gravatar
Total Posts 88

Re: Email configuration - TLS support

Yep I've checked, they only exist once. The only other item in the user.config related to e-mail is

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

I did notice, in the web.config file the following fields that I haven't done anything to:

<add key="DefaultEmailFrom" value="noreply@yoursite.com" />
<add key="WebMaster" value="noreply@yoursite.com" />

Do they need updating?

I am going to put this aside til tomorrow as I've spent all morning on it with no luck . I've probably missed something really obvious ; fresh eyes tomorrow might help!!

Thanks,

Leah

11/21/2008 2:21:22 AM
Gravatar
Total Posts 2

Re: Email configuration - TLS support

Were you able to get over the 504 error?  I'm receiving the same error, but all my settings appear to be the same...

11/21/2008 2:57:24 AM
Gravatar
Total Posts 88

Re: Email configuration - TLS support

Hi, no I actually haven't gotten back to it yet - I gave up and added it to my to-do list. I was going to try it with the host server's smtp settings to see if that makes any difference (I was previously just doing it on my local machine)

12/19/2008 10:21:04 AM
Gravatar
Total Posts 8

Re: Email configuration - TLS support

I'm getting the same error with GMail. The same credentials works for DNN on the same server. Any help would be greatly appreciated. Thanks!

Error message:
2008-12-19 11:10:00,806 ERROR mojoPortal.Web.ContactUI.ContactForm - 504 Unrecognized authentication type

web.config
<add key="SMTPServer" value="smtp.gmail.com" />
<add key="SMTPRequiresAuthentication" value="true" />
<add key="SMTPPort" value="587" />
<add key="SMTPUser" value="me@domain.com" />
<add key="SMTPPassword" value="password" />
<add key="SMTPUseSsl" value="true" />
<add key="SMTPTimeoutInMilliseconds" value="15000" />
<!-- leave this blank for ascii encoding -->
<add key="SmtpPreferredEncoding" value="" />
<!-- example for Russian encoding
<add key="SmtpPreferredEncoding" value="koi8-r" />
-->

12/19/2008 1:55:00 PM
Gravatar
Total Posts 18439

Re: Email configuration - TLS support

I'm sorry to hear you are having this difficulty. I have no explanation why it doesn't work for some people using gmail. It works for me.

All the information I have to offer is already on the Email Configuration page, if I knew any more I would add it there, so if you ever manage to get it solved please let me know what the problem was. I really don't think its anything specific to the mojoportal code. There are lots of possible reasons for it to not work including things like the ip address of the web site is blacklisted as a spammer. Or if the from address is not the same as the account email address.

Best,

Joe

3/7/2009 11:01:20 AM
Gravatar
Total Posts 1

Re: Email configuration - TLS support

I got same issue. I tried on port 465 but looks like GMAIL enforce to use TLS.

Anyone has a fix for this?

3/7/2009 11:11:37 AM
Gravatar
Total Posts 18439

Re: Email configuration - TLS support

 Hi,

I'm not sure if this will make a difference, but one thing you can try is change this to true in Web.config/user.config

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

By default we are using the DotNetOpenMail library, but this switch can make it use the built in .NET smtp classes.

It may produce the same result, but its worth a try.

Hope it helps,

Joe

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