cancel
Showing results for 
Search instead for 
Did you mean: 

Email not working in Alfresco 3.3g

jeremy
Champ in-the-making
Champ in-the-making
Hi,

I can't get email to work in Alfresco 3.3g.

I log into the localhost:8080/alfresco, click on 'Company Home', and then I click on 'View Details' from the 'More Actions' menu. Next I click on 'Manage Space Users', and then I invite a user. However, an invitation does not get emailed.

I have configured the email settings in the alfresco-global.properties file as follows:

#
# Outbound Email Configuration
#————-
#mail.host=
#mail.port=25
#mail.username=anonymous
#mail.password=
#mail.encoding=UTF-8
#mail.from.default=alfresco@alfresco.org
#mail.smtp.auth=false
mail.host=smtp.gmail.com
mail.port=465
mail.username=xxxxx
mail.password=xxxxx
mail.smtp.starttls.enable=true


The tomcat log contains the following:

INFO: Server startup in 52358 ms
18:05:25,515 User:admin ERROR [web.bean.TemplateMailHelperBean] Failed to send e
mail to xxxxx@xxxxx.com
org.springframework.mail.MailSendException: Mail server connection failed; neste
d exception is javax.mail.MessagingException: Could not connect to SMTP host: sm
tp.gmail.com, port: 465, response: -1
        at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailS
enderImpl.java:418)
        at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSen
derImpl.java:341)
        at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSen
derImpl.java:356)
        at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSen
derImpl.java:345)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invok
e(SubsystemProxyFactory.java:65)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:202)
        at $Proxy212.send(Unknown Source)
        at org.alfresco.web.bean.TemplateMailHelperBean.notifyUser(TemplateMailH
elperBean.java:179)
        at org.alfresco.web.bean.wizard.BaseInviteUsersWizard.finishImpl(BaseInv
iteUsersWizard.java:329)
        at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.
java:118)
        at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.
java:115)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransacti
on(RetryingTransactionHelper.java:321)
        at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.jav
a:124)
        at org.alfresco.web.bean.wizard.WizardManager.finish(WizardManager.java:
593)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java
:132)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(Actio
nListenerImpl.java:61)
        at javax.faces.component.UICommand.broadcast(UICommand.java:109)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:9
7)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1
71)
        at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(Invoke
ApplicationExecutor.java:32)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl
.java:95)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java
:70)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(Authentica
tionFilter.java:104)
        at sun.reflect.GeneratedMethodAccessor474.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory
$1.invoke(ChainingSubsystemProxyFactory.java:116)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:202)
        at $Proxy207.doFilter(Unknown Source)
        at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxy
Filter.java:82)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.jav
a:68)
        at sun.reflect.GeneratedMethodAccessor474.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory
$1.invoke(ChainingSubsystemProxyFactory.java:116)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:202)
        at $Proxy207.doFilter(Unknown Source)
        at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxy
Filter.java:82)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:852)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:48
9)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.g
mail.com, port: 465, response: -1
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1270)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:37
0)
        at javax.mail.Service.connect(Service.java:275)
        at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailS
enderImpl.java:388)
        … 65 more
18:15:26,312 User:admin ERROR [web.bean.TemplateMailHelperBean] Failed to send e
mail to jeremy.rees@hotmail.com
org.springframework.mail.MailSendException: Mail server connection failed; neste
d exception is javax.mail.MessagingException: Could not connect to SMTP host: sm
tp.gmail.com, port: 465, response: -1
        at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailS
enderImpl.java:418)
        at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSen
derImpl.java:341)
        at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSen
derImpl.java:356)
        at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSen
derImpl.java:345)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.SubsystemProxyFactory$1.invok
e(SubsystemProxyFactory.java:65)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:202)
        at $Proxy212.send(Unknown Source)
        at org.alfresco.web.bean.TemplateMailHelperBean.notifyUser(TemplateMailH
elperBean.java:179)
        at org.alfresco.web.bean.wizard.BaseInviteUsersWizard.finishImpl(BaseInv
iteUsersWizard.java:329)
        at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.
java:118)
        at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.
java:115)
        at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransacti
on(RetryingTransactionHelper.java:321)
        at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.jav
a:124)
        at org.alfresco.web.bean.wizard.WizardManager.finish(WizardManager.java:
593)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java
:132)
        at org.apache.myfaces.application.ActionListenerImpl.processAction(Actio
nListenerImpl.java:61)
        at javax.faces.component.UICommand.broadcast(UICommand.java:109)
        at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:9
7)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1
71)
        at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(Invoke
ApplicationExecutor.java:32)
        at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl
.java:95)
        at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java
:70)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(Authentica
tionFilter.java:104)
        at sun.reflect.GeneratedMethodAccessor474.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory
$1.invoke(ChainingSubsystemProxyFactory.java:116)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:202)
        at $Proxy207.doFilter(Unknown Source)
        at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxy
Filter.java:82)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.jav
a:68)
        at sun.reflect.GeneratedMethodAccessor474.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory
$1.invoke(ChainingSubsystemProxyFactory.java:116)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:202)
        at $Proxy207.doFilter(Unknown Source)
        at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxy
Filter.java:82)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:852)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:48
9)
        at java.lang.Thread.run(Thread.java:619)
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.g
mail.com, port: 465, response: -1
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1270)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:37
0)
        at javax.mail.Service.connect(Service.java:275)
        at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailS
enderImpl.java:388)
        … 65 more

I've read through the posts forums.alfresco.com/en/viewtopic.php?t=16018 and forums.alfresco.com/en/viewtopic.php?t=3821 but it hasn't helped me.

I can send email using my web client (Outlook).

Would I have to change the source code to get this to work, or is there a way to configure it ?

Thanks.
1 REPLY 1

jeremy
Champ in-the-making
Champ in-the-making
I just got Alfresco 3.3g to send email.

I found forums.alfresco.com/en/viewtopic.php?f=9&t=25402 helpful.

To resolve this issue I changed the alfresco-global.properties file as follows:

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