This is my email conf properties in alfresco-global.properties file
mail.host=smtp.gmail.com
mail.port=465
mail.username=***@gmail.com
mail.password=***
mail.protocol=smtps
mail.smtps.starttls.enable=true
mail.smtps.auth=true
mail.smtp.timeout=30000
I am getting this exceptions
2018-02-21 12:46:51,673 ERROR [action.executer.MailActionExecuter] [mailAsyncAction2] Failed to send email to ramesh.pate1998@gmail.com : org.springframework.mail.MailSendException: Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;
nested exception is:
java.net.ConnectException: Connection refused: connect. Failed messages: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;
nested exception is:
java.net.ConnectException: Connection refused: connect; message exceptions (1) are:
Failed message 1: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;
nested exception is:
java.net.ConnectException: Connection refused: connect
2018-02-21 12:46:51,673 ERROR [action.executer.MailActionExecuter] [mailAsyncAction1] Failed to send email to ramesh.pate1998@gmail.com : org.springframework.mail.MailSendException: Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;
nested exception is:
java.net.ConnectException: Connection refused: connect. Failed messages: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;
nested exception is:
java.net.ConnectException: Connection refused: connect; message exceptions (1) are:
Failed message 1: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;
nested exception is:
java.net.ConnectException: Connection refused: connect
2018-02-21 12:46:51,674 ERROR [action.executer.MailActionExecuter] [mailAsyncAction3] Failed to send email to ramesh.pate1998@gmail.com : org.springframework.mail.MailSendException: Mail server connection failed; nested exception is com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;
nested exception is:
java.net.ConnectException: Connection refused: connect. Failed messages: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;
nested exception is:
java.net.ConnectException: Connection refused: connect; message exceptions (1) are:
Failed message 1: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: localhost, 25; timeout -1;
nested exception is:
java.net.ConnectException: Connection refused: connect
Exception in thread "mailAsyncAction3" java.lang.ClassCastException: com.sun.proxy.$Proxy322 cannot be cast to org.alfresco.repo.action.executer.LoggingAwareExecuter
at org.alfresco.repo.action.ActionServiceImpl.onLogException(ActionServiceImpl.java:1823)
at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:442)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "mailAsyncAction2" java.lang.ClassCastException: com.sun.proxy.$Proxy322 cannot be cast to org.alfresco.repo.action.executer.LoggingAwareExecuter
at org.alfresco.repo.action.ActionServiceImpl.onLogException(ActionServiceImpl.java:1823)
at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:442)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread "mailAsyncAction1" java.lang.ClassCastException: com.sun.proxy.$Proxy322 cannot be cast to org.alfresco.repo.action.executer.LoggingAwareExecuter
at org.alfresco.repo.action.ActionServiceImpl.onLogException(ActionServiceImpl.java:1823)
at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:442)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Solved! Go to Solution.
Hi Manav,
Your properties doesn't seem to be taken into account.
Check that your alfresco-global.properties file is readable to the alfresco process and is in the right location (should be in $CATALINA_HOME/shared/classes).
It may also be because there are some options that have been set in the admin console and overrides the properties in this file. Check your Alfresco admin console.
Hi Manav,
Your properties doesn't seem to be taken into account.
Check that your alfresco-global.properties file is readable to the alfresco process and is in the right location (should be in $CATALINA_HOME/shared/classes).
It may also be because there are some options that have been set in the admin console and overrides the properties in this file. Check your Alfresco admin console.
just a dumb question: restarted alfresco after config change?
Second: Alfresco Versions prior 3.3 need a change to custom-email-context.xml to use smtps - but I don't think you are using 3.2 or older...
@Martin Ehe ,@Alexander. Thank you very much for your replies,
I just cleaned my maven project and all is working fine.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.