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

heislord5
Champ in-the-making
Champ in-the-making
also SMTP from gmail works from Email client (Thunderbird) on same computer

heislord5
Champ in-the-making
Champ in-the-making
I've probably spent over 15 hours working on this on Christmas Eve and Christmas Day!  If anyone can help please do.

heislord5
Champ in-the-making
Champ in-the-making
Ok.

It appears quite a few of my emails went through.  Grrr, lol.  Grrr.  (Isn't that the expression you'd expect from someone trying to get this stuff to work).

The emails were actually sent from my gmail account and when I logged into gmail they were in my sent folder.

None of them made it out of the sent folder to the destination account.  Neither did any of them report any undeliverable messages.  This is very strange to me, probably because I do not know a whole lot about the email spam filters these services may have.  I tried sending email to myself.

heislord5
Champ in-the-making
Champ in-the-making
email received when sent from gmail to my hotmail account.

heislord5
Champ in-the-making
Champ in-the-making
working settings:

    <bean id="mailService" class="org.springframework.mail.javamail.JavaMailSenderImpl">
        <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>


# Email configuration
mail.host=smtp.gmail.com
mail.port=465
mail.protocol=smtps
mail.username=user@gmail.com
mail.password=password
mail.smtps.starttls.enable=true
mail.smtps.auth=true

bnice
Champ in-the-making
Champ in-the-making
Hi,

is that configuration working in the final version, too?
I'm also struggling with that email-issue (independent of provider). Are there just these two files to be configured?

parveenh
Champ in-the-making
Champ in-the-making
Hi I am trying send mail to alfresco repository, I have mail called abc@optimum-outsourcing.com, i want to comfigure this email to alfresco repository, I am using 3.0.0 version of alfresco,
I can send mail from alfresco to my mail, but when I am sending mail from my outlook to that id, nothing is happening, can anyone help me to configure this..

Thanks

bnice
Champ in-the-making
Champ in-the-making
Hi,

I'm not using this feature (to send mails to alfresco), but I stumbled over it, when trying to configure Aflresco for sending mail.
I think you have to configure the Alfresco mail-server. There is a file called custom-email-server.sample.zip in /tomcat/shared/classes/alfresco/extension.
You'll have to unzip it and configure the contained file for your needs. I think you'll find some more information about that in this forum.

spillai
Champ in-the-making
Champ in-the-making
Hey All,

The following configurations in repository.properties and some changes in the core-services-context.xml worked for me.

Set the following properties in repository.properties
mail.host=smtp.gmail.com
mail.port=587
mail.username=yourid@gmail.com
mail.password=yourpassword
# Set this value to UTF-8 or similar for encoding of email messages as required
mail.encoding=UTF-8
# Set this value to 7bit or similar for Asian encoding of email headers as required
mail.header=test

# Extra properties added by me
mail.smtp.starttls.enable=true
mail.smtp.auth=true
mail.smtp.debug=true

Now in the file core-services-context.xml for the MAIL SERVICE section for bean id="mailService"
add a new property as –
<property name="javaMailProperties">
            <props>
                <prop key="mail.smtp.auth">${mail.smtp.auth}</prop>
                <prop key="mail.smtp.starttls.enable">${mail.smtp.starttls.enable}</prop>
      <prop key="mail.smtp.debug">${mail.smtp.debug}</prop>
            </props>
</property>

Can any one share the properties to be set for inbound mail settings?
Will appreciate that.