Setting up email notifications through Gmail

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member

Setting up email notifications through Gmail

I am trying to setup email notifications through a gmail account and getting 

###

ERROR [org.alfresco.repo.action.executer.MailActionExecuter] [mailAsyncAction1] Failed to send email to [CMDbuild] : org.springframework.mail.MailSendException: Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.gmail.com, 465; timeout -1;
nested exception is:
java.net.ConnectException: Connection timed out: connect. Failed messages: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.gmail.com, 465; timeout -1;
nested exception is:
java.net.ConnectException: Connection timed out: connect; message exceptions (1) are:
Failed message 1: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.gmail.com, 465; timeout -1;
nested exception is:
java.net.ConnectException: Connection timed out: connect

###

I used the alfresco documentation and some youtube walkthroughs don't know what I am doing wrong. 

alfresco-global.properties settings

...

### E-mail site invite settings###
notification.email.siteinvite=true


# Sample Gmail settings
mail.host=smtp.gmail.com
mail.port=465
mail.protocol=smtps
mail.username=myemail.address@gmail.com
mail.password=XXXX####"Special Character here"
mail.smtp.timeout=30000
#New Properties
mail.smtps.starttls.enable=true
mail.smtps.auth=true

...

To clarify  my email address contains a dot "." in the middle not sure if that is going to cause an issue. The password also has a spacial character but there are no '"' in the password field or in the password itself. 

My IMAP and POP protocols are disabled in my google account, do they need to be activated?

IMAP protocol is commented out in the in the alfresco-global.properties file. None of the tutorials I used enabled them for gmail setup.

Anyway I am going to keep working on it, if you have a suggestion please let me know.

Thanks

Tyler

4 Replies
Highlighted
Alfresco Employee

Re: Setting up email notifications through Gmail

Can you telnet from that machine to GMail SMTP ? For example:

$ telnet smtp.gmail.com 465

Trying 66.102.1.108...

Connected to gmail-smtp-msa.l.google.com.

Escape character is '^]'.

Regards,

Jan

Highlighted
Active Member

Re: Setting up email notifications through Gmail

Got a could not open connect to the host, on port 465: connection failed

Highlighted
Alfresco Employee

Re: Setting up email notifications through Gmail

Depending on your environment, check outbound

firewall rules  / iptables / security group ?

Regards,

Jan

Highlighted
Active Member

Re: Setting up email notifications through Gmail

All firewall controls are outside of my authority. If the connection settings all look good then I will talk to IT and see if they are able to add an exception.