cancel
Showing results for 
Search instead for 
Did you mean: 

Problems sending notifications - No provider for smtp

jacortijo
Champ in-the-making
Champ in-the-making
Hi all,

I am testing Alfresco 3.4d and so far I manage to setup the authorization against AD and replicate the user with its email.
the next requirement  is to receive emails when there are new docs or some are updated or deleted.
I set up a rule for that, seems quite straightforward. I also add the few lines in the alfresco-global.properties
   
mail.from.default=alfresco@mycompany.com
    mail.host=172.18.168.3
    mail.port=25
    mail.protocol=smtp
    mail.encoding=UTF-8
    mail.smtp.auth=false
   
I also enable the relay in our internal exchange server for the IP address of the alfresco server.
the emails didnt arrive and taking a look in the logs I found the followin error:
javax.mail.NoSuchProviderException: No provider for smtp
the full error below.

17:36:45,527 User:cortijo ERROR [action.executer.MailActionExecuter] Failed to send email to [cortijo]
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.NoSuchProviderException: No provider for smtp
   at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:418)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:341)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:356)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:345)
   at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:439)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:133)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:65)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy252.execute(Unknown Source)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:749)
   at org.alfresco.repo.action.executer.CompositeActionExecuter.executeImpl(CompositeActionExecuter.java:66)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:133)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:749)
   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:675)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1$1.execute(AsynchronousActionExecutionQueueImpl.java:443)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:253)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:452)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:455)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:619)
Caused by: javax.mail.NoSuchProviderException: No provider for smtp
   at javax.mail.Session.getProvider(Session.java:455)
   at javax.mail.Session.getTransport(Session.java:650)
   at javax.mail.Session.getTransport(Session.java:631)
   at org.springframework.mail.javamail.JavaMailSenderImpl.getTransport(JavaMailSenderImpl.java:433)
   at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:387)
   … 27 more
17:36:46,058  ERROR [repo.action.AsynchronousActionExecutionQueueImpl] Failed to execute asynchronous action: Action[ id=a0c4d975-9557-4916-b93e-89756021503d, node=workspace://SpacesStore/a0c4d975-9557-4916-b93e-89756021503d ]
org.alfresco.error.AlfrescoRuntimeException: 03280047 Failed to send email to:[cortijo]
   at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:466)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:133)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invoke(SubsystemProxyFactory.java:65)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy252.execute(Unknown Source)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:749)
   at org.alfresco.repo.action.executer.CompositeActionExecuter.executeImpl(CompositeActionExecuter.java:66)
   at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:133)
   at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:749)
   at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:675)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1$1.execute(AsynchronousActionExecutionQueueImpl.java:443)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:253)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper$1.doWork(AsynchronousActionExecutionQueueImpl.java:452)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
   at org.alfresco.repo.action.AsynchronousActionExecutionQueueImpl$ActionExecutionWrapper.run(AsynchronousActionExecutionQueueImpl.java:455)
   at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:619)
Caused by: org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.NoSuchProviderException: No provider for smtp
   at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:418)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:341)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:356)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:345)
   at org.alfresco.repo.action.executer.MailActionExecuter.executeImpl(MailActionExecuter.java:439)
   … 23 more
Caused by: javax.mail.NoSuchProviderException: No provider for smtp
   at javax.mail.Session.getProvider(Session.java:455)
   at javax.mail.Session.getTransport(Session.java:650)
   at javax.mail.Session.getTransport(Session.java:631)
   at org.springframework.mail.javamail.JavaMailSenderImpl.getTransport(JavaMailSenderImpl.java:433)
   at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:387)
   … 27 more

I checked and the mail.jar is located in
{tomcat_home}\webapps\alfresco\WEB-INF\lib

I couldnt find any information in the forum about this error…

Anyone could give me some suggestions?

thanks a lot in advance.
Jose
1 REPLY 1

nadaoneal
Champ in-the-making
Champ in-the-making
Although you told your exchange server to accept emails from the Alfresco server, it looks like the handoff is not working.

On the command line on the Alfresco server, try:

$ telnet 172.18.168.3 25

If you get something like:

Connected to localhost.localdomain (172.18.168.3).
Escape character is '^]'.
220 172.18.168.3 ESMTP Sendmail 8.13.8/8.13.8; Fri, 27 May 2011 16:29:47 -0400

Then you have some other issue - not sure what.

If you get something like a timeout error, though, then your Alfresco server cannot communicate on port 25 to your exchange server. Check the exchange server logs and see if you see the connections from the Alfresco server. Maybe the server is being denied because you used a host alias, but the host is identifying itself with another name, or you used the hostname when you need to use the IP. (I don't know anything about Exchange.)

If you don't see any denials of the Alfresco server in the Exchange logs…
- You might need to change the firewall settings on your exchange server - maybe you need to add the Alfresco server there too.
- You might need to change firewall settings elsewhere on your network.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.