AnsweredAssumed Answered

Email - Alfresco with Gmail SMTP

Question asked by heislord5 on Dec 26, 2008
Latest reply on May 10, 2014 by mrogers
Hi,

I have been trying tirelessly to get this working.  I've tried dozens of different configurations in the core-services-content.xml file.  Does ANYONE have email working with Gmail SMTP in Alfresco 3!  Not 2.1.

Anyone?  I think it just doesn't work.  I've tried a number of configurations that have worked for others in earlier versions, but no dice for me (I am attempting on 3c).

Here are the things I've found out.  It appears that Gmail uses 465 for SSL communication and 587 for non-ssl.  Also, you have to starttls before you can connect.

The parameters vary from person to person and none of them work for me.  I'm going to list them below.  Some will have (s) on there…that means the "s" is sometimes not there depending on who I was getting the information from.  Since 465 is the SSL port, that is when one might expect to have the "s" on the parameter, but not even that was consistent.  Some people showed it with and some without the "s".  For simplicity I hard coded the values rather than using the properties file.


  <property name="host">
    <value>smtp.gmail.com</value>
  </property>
  <property name="port">
    <value>465</value>
  </property>                                         
  <property name="protocol">                           
    <value>smtps</value>
  </property>
  <property name="username">
    <value>userName@gmail.com</value>
  </property>
  <property name="password">
    <value>UserPassword</value>
  </property>
  <property name="defaultEncoding">
    <value>UTF-8</value>
  </property>

  <property name="javaMailProperties">
    <props>
      <prop key="mail.smtps.auth">true</prop>
      <prop key="mail.smtp.socketFactory.port">465</prop>
      <prop key="mail.smtp.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop>
      <prop key="mail.smtp.socketFactory.fallback">false</prop>
      <prop key="mail.smtp.timeout">25000</prop>
      <prop key="mail.smtps.starttls.enable">true</prop>
    </props>
  </property>

I tried bunches of variations with the 587 port as well without the s's and with the s's and mixed bag.

Does anyone have this working.  It would be super awesome if someone actually got it working.

Outcomes