Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 5.x > Installation and deployment > GMail or Google Apps as SMTP Server View modes: 
User avatar
Member
Member
Kurt Farrar - 8/13/2010 2:17:39 PM
   
GMail or Google Apps as SMTP Server
All,

I've just spent a good hour or so looking at this and scratching my head so I thought I'd share it with everyone else.

A number of my customers are now using Google Apps, and would like Kentico to send e-mail from their domain via Google Apps' smtp server.

Doesn't sound unreasonable right?

OK, so since 2008 Kentico CMS has allowed you to specify the smtp server and the port in the format smtpserver:port in the SMTP Server field under Settings > E-mail and you can select the box to use SSL (both seemingly fulfilling Google's requirements), but entering the SSL port as found on this page (465 at time of posting), doesn't work:
http://mail.google.com/support/bin/answer.py?hl=en&answer=13287

I was left scratching my head as the mail queue attempts to send, but then times out. I didn't know if I'd missed something.

Anyway, you need to enter the port as the TLS port from the page above instead (587 at time of posting).

Hey presto, you can then use GMail as your SMTP server, which is particularly useful if the DNS is configured with an SPF record.

Hope this helps,

Kurt Farrar
Small Business IT Consultant
MyDigitalMedia (Kentico Gold Partner)

User avatar
Member
Member
sander_ganzevles-hotmail - 5/2/2012 3:06:04 PM
   
RE:GMail or Google Apps as SMTP Server
Hi All,

After switching to google Apps we have some problems with the email client as well. I tried following the instructions explained in the above post, but I still get the following error when sending mail:
Request for the permission of type 'System.Net.Mail.SmtpPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I set smtp server to smtp.gmail.com:587 and switched on the SSL checkbox.

Could anyone please help?

Sander Ganzevles

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 5/4/2012 7:35:47 PM
   
RE:GMail or Google Apps as SMTP Server
Hi,

I Google-ed this error and most of the posts were talking about the trust level set in your environment for the application.

Which level are you running? Have you tried setting the level to full?

In web.config file:
<trust level="Full"...

Best regards,
Juraj Ondrus

User avatar
Member
Member
sander_ganzevles-hotmail - 5/14/2012 3:50:57 AM
   
RE:GMail or Google Apps as SMTP Server
Hi Juraj,

Thanks for your reply and pointing me in the right direction. After some investigation I found out that we ran in to an unexpected security error with our hosting company.

With best regards,

Sander Ganzevles

User avatar
Kentico Support
Kentico Support
kentico_zdenekc - 5/14/2012 5:21:10 AM
   
RE:GMail or Google Apps as SMTP Server
Hi,

Thank you for the info about your findings.

Please let us know if we can be of any further help.

Best regards,
Zdenek