Search
Close this search box.

Using Google SMTP on Alfresco Document Management System

The following has been tested to work on Alfresco version 3.4d

In the following tutorial we are assuming that Alfresco is installed in directory /opt/alfresco/ and it will be referred to as “alfresco_home”.

Now Edit the file alfresco_home/tomcat/shared/classes/alfresco-global.properties and put the following lines at the bottom of the file. This will enable alfresco to use Google Apps SMTP or Gmail.

{code}
# Sample Gmail settings
mail.host=smtp.gmail.com
mail.port=465
mail.protocol=smtps
[email protected]
mail.password=password

# New Properties
mail.smtps.starttls.enable=true
mail.smtps.auth=true{/code}

If you are a Google Apps user put the username as [email protected]

Now create a file called alfresco_home/tomcat/shared/classes/alfresco/extension/custom.email.context.xml and enter the following:

{code}
<xml version=’1.0′ encoding=’UTF-8′?>
<!DOCTYPE beans PUBLIC ‘-//SPRING//DTD BEAN//EN’ ‘http://www.springframework.org/dtd/spring-beans.dtd’>

<beans>
<!– –>
<!– MAIL SERVICE –>
<!– –>

<bean id=”mailService”>
<property name=”host”>
<value>${mail.host}</value>
</property>
<property name=”port”>
<value>${mail.port}</value>
</property>
<property name=”protocol”>
<value>${mail.protocol}</value>
</property>
<property name=”username”>
<value>${mail.username}</value>
</property>
<property name=”password”>
<value>${mail.password}</value>
</property>
<property name=”defaultEncoding”>
<value>${mail.encoding}</value>
</property>
<property name=”javaMailProperties”>
<props>
<prop key=”mail.smtps.auth”>${mail.smtps.auth}</prop>
<prop key=”mail.smtps.starttls.enable”>${mail.smtps.starttls.enable}</prop>
</props>
</property>
</bean>
</beans>
{/code}

Now restart Alfresco and alfresco should now be able to send emails using Google Apps/Gmail.

Share on:

You may also like

en_GB

Subscribe To Our Newsletter