AnsweredAssumed Answered

Configuration du SMTP pour l'envoi des notifications

Question asked by ibrahim on May 21, 2010
Latest reply on Jun 11, 2010 by ibrahim
Bonjour tous le monde;

J'ai configuré mon alfresco pour l'envoi des Email, on m'a dit que je doit modifier 3 fichiers:

1- web-client-config.xml
<from-email-address>email.alfresco@gmail.com</from-email-address>

2- core-services-config.xml
    <!–                       –>

    <!– MAIL SERVICE          –>

    <!–                       –>



    <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>

    </bean>


3- repository.properties
 mail.host = smtp.gmail.com
mail.port = 25
mail.transport.protocol = smtp
mail.username = ************@gmail.com
mail.password=*********
mail.smtp.auth = true
mail.smtp.socketFactory.port = 25
mail.smtp.socketFactory.class = javax.net.ssl.SSLSocketFactory
mail.smtp.socketFactory.fallback = false
mail.smtp.timeout = 25000
mail.smtp.starttls.enable = true
mail.encoding=UTF-8

j'ai aussi pensé a ouvrir les port smtp sur mon parfeu ubuntu (iptables)

iptables -A OUTPUT -p TCP –dport 25 -j ACCEPT
iptables -A INPUT -p TCP –dport 25 -j ACCEPT

Pourtant j'ai toujours cette erreur :(

13:03:41,047 User:b.bouziani ERROR [web.bean.TemplateMailHelperBean] Failed to send email to b.bouziani@gmail.com
org.springframework.mail.MailSendException; nested exception details (1) are:
Failed message 1:
com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. s9sm4508773vcr.3

   at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1388)
   at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:959)
   at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:583)
   at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:402)
   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 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:616)
   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 $Proxy210.send(Unknown Source)
   at org.alfresco.web.bean.TemplateMailHelperBean.notifyUser(TemplateMailHelperBean.java:179)
   at org.alfresco.web.bean.wizard.BaseInviteUsersWizard.finishImpl(BaseInviteUsersWizard.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.doInTransaction(RetryingTransactionHelper.java:321)
   at org.alfresco.web.bean.dialog.BaseDialogBean.finish(BaseDialogBean.java: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:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:616)
   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:104)
   at sun.reflect.GeneratedMethodAccessor475.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:616)
   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(JdkDynamicAopProxy.java:202)
   at $Proxy203.doFilter(Unknown Source)
   at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   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:68)
   at sun.reflect.GeneratedMethodAccessor475.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:616)
   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(JdkDynamicAopProxy.java:202)
   at $Proxy203.doFilter(Unknown Source)
   at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   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:636)


J'ai changé aussi le port et j'ai mit 465 (que j'ai trouvé sur la docs), pour ce cas il y a pas d'erreur sur la log, mais le client bloque.

Des Idées? j'en ai vraiment besoin !!!!!

MERCIIII

Outcomes