cancel
Showing results for 
Search instead for 
Did you mean: 

Outbound Email Configuration error

jkueh
Champ in-the-making
Champ in-the-making
Hello all

I am hoping someone can help me with my outbound email configuration.

I've edited a alfresco-global.properties file so that mail.testmessage.send=true. This works - I do get a test email confirming that the Outbound Email Subsystem is working.

However, when I try to use email notification of a workflow, no email is sent. alfreso.log shows the following:

12:55:35,851 ERROR [org.alfresco.repo.action.executer.MailActionExecuter] Failed to send email to [jkueh]
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Unexpected exception borrwoing connection from pool;
  nested exception is:
   java.util.NoSuchElementException: Could not create a validated object, cause: ValidateObject failed. Failed messages: javax.mail.MessagingException: Unexpected exception borrwoing connection from pool;
  nested exception is:
   java.util.NoSuchElementException: Could not create a validated object, cause: ValidateObject failed; message exception details (1) are:
Failed message 1:
javax.mail.MessagingException: Unexpected exception borrwoing connection from pool;
  nested exception is:
   java.util.NoSuchElementException: Could not create a validated object, cause: ValidateObject failed
   at org.alfresco.repo.mail.AlfrescoJavaMailSender$PooledTransportWrapper.protocolConnect(AlfrescoJavaMailSender.java:214)
   at javax.mail.Service.connect(Service.java:275)
   at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336)
   at org.alfresco.repo.action.executer.MailActionExecuter.sendEmail(MailActionExecuter.java:929)
   at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:490)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:258)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:72)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at com.sun.proxy.$Proxy308.execute(Unknown Source)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:838)
   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:738)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1$1.execute(AsynchronousActionExecutionQueueImpl.java:428)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:452)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:323)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:437)
   at org.alfresco.repo.tenant.TenantUtil.runAsWork(TenantUtil.java:119)
   at org.alfresco.repo.tenant.TenantUtil.runAsTenant(TenantUtil.java:88)
   at org.alfresco.repo.tenant.TenantUtil$1.doWork(TenantUtil.java:62)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
   at org.alfresco.repo.tenant.TenantUtil.runAsUserTenant(TenantUtil.java:58)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:440)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:724)
Caused by: java.util.NoSuchElementException: Could not create a validated object, cause: ValidateObject failed
   at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1234)
   at org.alfresco.repo.mail.AlfrescoJavaMailSender$PooledTransportWrapper.protocolConnect(AlfrescoJavaMailSender.java:205)
   … 30 more


Can anyone help me with this?
8 REPLIES 8

mitpatoliya
Star Collaborator
Star Collaborator
Check for the email address configured for this user "jkueh". There is possibility it does not have valid mail id. As per log also it is trying to send mail to him only.

jkueh
Champ in-the-making
Champ in-the-making
Hello Mits

The mail id is correct. I get the same issues with the following:

1. Any workflow which is not "Ad Hoc Tasks", e.g. Approval workflows
2. Site invite (even to external e-mails where I manually enter the e-mail address)

I am getting e-mail notifications for Ad Hoc Tasks, and also recent activities e-mail

Has anyone else faced this problem?

Thanks
Justin

fowlkes
Champ on-the-rise
Champ on-the-rise
I have the very same problem!  Please let me know if you find a solution.

mitpatoliya
Star Collaborator
Star Collaborator
Are you using multi tenancy by any chance?
There are few traces related to that I can see in logs.

tonyrivet
Champ in-the-making
Champ in-the-making
I had the same issue and resolved it thanks to this JIRA : https://issues.alfresco.com/jira/browse/ALF-19794
I have increased the
mail.smtp.timeout
parameter (set to 5000 by default), and all emails could be sent properly.
See the last comment of the JIRA for more explanations.

Hi,

Same issue… We have put 40000 and now it's ok.

With the same exchange server, it's ok with Alfresco 4.0.D (RHEL 5.6). The bug is only with Alfresco 4.2.e (RHEL 6.5).
But now it's sometime slow for users when they accept tasks (which send mail)…
Why was all ok with 4.0.d and not with 4.2.e ? (Is it related to the Linux version?)

Thank you.

alm1206
Champ in-the-making
Champ in-the-making
Dear Sirs,

I have configured Alfresco Global Properties file in order to send emails. Here is what I changed in the file:

# Outbound Email Configuration

#————-

mail.host=smtp.gmail.com

mail.port=465

mail.username=MYEMAIL@gmail.com

mail.password=MYPASSWORD

mail.encoding=UTF-8

mail.from.default=MYEMAIL@gmail.com

mail.smtp.auth=false

mail.protocol=smtp

Is there anything else I sould configure in order to get it working?

Tks!

Hi,
Here is my gmail smtp configuration and it works.
You should enabled security/tls.

mail.host=smtp.gmail.com
mail.port=465
mail.username=myemail@gmail.com
mail.password=mypassword
mail.from.default=myemail@gmail.com
mail.protocol=smtps
mail.smtp.auth=true
mail.smtp.timeout=30000
mail.smtp.starttls.enable=true