cancel
Showing results for 
Search instead for 
Did you mean: 

Gmail Alfresco Community 3.2

pjcaracuel
Champ in-the-making
Champ in-the-making
Hi,

I tried configured Alfresco to send mail using gmail

1.- In file alfresco-global.properties I put:


mail.host = smtp.gmail.com
mail.port = 465
mail.transport.protocol = smtp
mail.username = pedro.jimenez.caracuel@gmail.com
mail.password= xxxxxxxx
mail.smtp.auth = true
mail.smtp.socketFactory.port = 465
mail.smtp.socketFactory.class = javax.net.ssl.SSLSocketFactory
mail.smtp.socketFactory.fallback = false
mail.smtp.timeout = 25000
mail.smtp.starttls.enable = true

In core-services-context.xml


<bean id="mailService" class="org.springframework.mail.javamail.JavaMailSenderImpl">
  <property name="host">
    <value>${mail.host}</value>
  </property>
  <property name="port">
    <value>${mail.port}</value>
  </property>                                          
  <property name="protocol">                          
    <value>${mail.transport.protocol}</value>
  </property>
  <property name="username">
    <value>${mail.username}</value>
  </property>
  <property name="password">
    <value>${mail.password}</value>
  </property>
  <property name="defaultEncoding">
    <value>${mail.encoding}</value>
  </property>

  <property name="javaMailProperties">
    <props>
      <prop key="mail.smtp.auth">${mail.smtp.auth}</prop>
      <prop key="mail.smtp.socketFactory.port">${mail.smtp.socketFactory.port}</prop>
      <prop key="mail.smtp.socketFactory.class">${mail.smtp.socketFactory.class}</prop>
      <prop key="mail.smtp.socketFactory.fallback">${mail.smtp.socketFactory.fallback}</prop>
      <prop key="mail.smtp.timeout">${mail.smtp.timeout}</prop>
    </props>
  </property>

I see the wiki post: http://wiki.alfresco.com/wiki/E-mail_Configuration

But I get the following error message:


09:55:26,373 ERROR [org.alfresco.web.bean.TemplateMailHelperBean] Failed to send email to pjcaracuel@intecna.es org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
  nested exception is:
   java.net.ConnectException: Connection timed out: connect
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.gmail.com, port: 465;
  nested exception is:
   java.net.ConnectException: Connection timed out: connect
   at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282)
   at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
   at javax.mail.Service.connect(Service.java:275)
   at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:379)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:332)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:347)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336)
   at org.alfresco.web.bean.TemplateMailHelperBean.notifyUser(TemplateMailHelperBean.java:174)
   at org.alfresco.web.bean.wizard.BaseInviteUsersWizard.finishImpl(BaseInviteUsersWizard.java:280)
   at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:124)
   at org.alfresco.web.bean.dialog.BaseDialogBean$1.execute(BaseDialogBean.java:121)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:326)
   at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java:130)
   at org.alfresco.web.bean.wizard.WizardManager.finish(WizardManager.java:599)
   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.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
   at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
   at javax.faces.component.UICommand.broadcast(UICommand.java:109)
   at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
   at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.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(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:110)
   at sun.reflect.GeneratedMethodAccessor496.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:122)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
   at $Proxy186.doFilter(Unknown Source)
   at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:88)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:74)
   at sun.reflect.GeneratedMethodAccessor496.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:122)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
   at $Proxy186.doFilter(Unknown Source)
   at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:88)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.ConnectException: Connection timed out: connect
   at java.net.PlainSocketImpl.socketConnect(Native Method)
   at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
   at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
   at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
   at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
   at java.net.Socket.connect(Socket.java:519)
   at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:550)
   at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:141)
   at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232)
   at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:163)
   at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250)
   … 60 more

Any idea??

THKS
6 REPLIES 6

dward
Champ on-the-rise
Champ on-the-rise
Are you by an chance running behind a firewall?

If this command doesn't work, then it's unlikely to work with Alfresco

ping smtp.gmail.com

pjcaracuel
Champ in-the-making
Champ in-the-making
It doesn't work, what a pity!!!

dward
Champ on-the-rise
Champ on-the-rise
Well surely whatever network you are in has a server that is capable of acting as an SMTP server? How are your mail clients configured?

savic_prvoslav
Champ on-the-rise
Champ on-the-rise
Gmail works great!!!

ssaravanan
Champ in-the-making
Champ in-the-making
That doesn't seems to work.
At the moment, Alfresco has such a lot of functionality, like,
1. Imap integration
2. SMTP configuration options
3. LDAP , AD, NTLM, Kerberos authentications
4. Records management
5. Multi tenancy
6. Share , Surf
7. CMIS
8. Lotus notes integration, etc
Most of the Alfresco developers spend most of their time
in figuring out the right configuration settings.
It would be ideal if we have a GUI approach for configuring things , like this
http://www.thinsy.com/c/alfresco (for Active Directory configuration)

mikeh
Star Contributor
Star Contributor
Most of the Alfresco developers spend most of their time
in figuring out the right configuration settings.
It would be ideal if we have a GUI approach for configuring things , like this
http://www.thinsy.com/c/alfresco (for Active Directory configuration)
…or like JMX perhaps?

Mike