cancel
Showing results for 
Search instead for 
Did you mean: 

Email - Alfresco with Gmail SMTP

heislord5
Champ in-the-making
Champ in-the-making
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.
31 REPLIES 31

anik
Champ in-the-making
Champ in-the-making
Coooooooooool Dude … Great
cheers

tusharpatel88
Champ in-the-making
Champ in-the-making
mail.host=smtp.gmail.com
mail.port=465
mail.username=youremail
mail.password=yourpassword

mail.protocol=smtps
mail.smtps.starttls.enable=true
mail.smtps.auth=true
mail.testmessage.send=true
mail.testmessage.to=youremail
mail.testmessage.subject=Outbound SMTP
mail.testmessage.text=The Outbound SMTP email subsystem is working.
mail.smtps.starttls.enable=true
mail.smtp.socketFactory.port=465
mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
mail.smtp.socketFactory.fallback=false
notification.email.siteinvite=true



1 Please add above properties in global.properties file.
2 change email and password according to youre email.
3 Restart server
4 The email notification will send to your server.