cancel
Showing results for 
Search instead for 
Did you mean: 

Probleme d'envoi de mails

hajarsus
Champ in-the-making
Champ in-the-making
Bonjour tout le monde,

je serai très reconnaissante si vous m'aider a résoudre le problème suivant :

pour l'étape : Notifier les utilisateurs.
je sélectionne l'option "oui", pour envoyer un courriel pour prévenir les utilisateurs invité.
mais il envoi pas de mail. Pourquoi ? et qu'est ce que je doit faire pour résoudre ce problème.

j'utilise la version community, avec une BD mysql, sous ubuntu.

merci d'avance.
7 REPLIES 7

jm_pascal
Star Contributor
Star Contributor
Bjr,

La configuration SMTP a bien été mis en place ?

hajarsus
Champ in-the-making
Champ in-the-making
Non, je sais pas comment faire, vous pouvez me montrer SVP ??

dranakan
Champ on-the-rise
Champ on-the-rise
Hello,

Il faut paramétrer Alfresco :
Dans /opt/Alfresco3/tomcat/shared/classes/alfresco-global.properties, enlever les commentaires et remplacer par vos configurations. (exemple qui suit en Alf3.2r2, en 3.3 il y a certains champs en plus… à configurer…)
# Email Server properties
#————-
email.server.enabled=true
email.server.port=25
email.server.domain=alfresco.com
email.inbound.unknownUser=anonymous
(redémarrer Alfresco)

Bonne chance 🙂

hajarsus
Champ in-the-making
Champ in-the-making
merci de répondre, j'ai enlevé les commentaire mais ça marche pas. voila le code du fichier alfresco-global.properties :


###############################
## Common Alfresco Properties #
###############################

#
# Sample custom content and index data location
#————-
dir.root=/home/hajar/Alfresco/alf_data

#
# Sample database connection properties
#————-
db.name=alfresco
db.username=alfresco
db.password=alfresco
db.host=localhost
db.port=3306

#
# External locations
#————-
ooo.exe=/home/hajar/Alfresco/program/soffice
ooo.user=<%ShortInstallDir%>/alf_data/oouser
jodconverter.officeHome=/home/hajar/Alfresco
jodconverter.portNumbers=8101
#ooo.enabled=false
#jodconverter.enabled=true
img.root=/usr/local
swf.exe=/home/hajar/Alfresco/bin/pdf2swf

#
# Initial admin password
#————-
alfresco_user_store.adminpassword=2f3d1da5c069f11b8559b67d0873e0cd

#
# MySQL connection
#————-
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://${db.host}:${db.port}/${db.name}

#
# Oracle connection
#
#oracle#db.driver=oracle.jdbc.OracleDriver
#oracle#db.url=jdbc:oracle:thin:@${db.host}:${db.port}:${db.name}

#
# SQLServer connection (note you must enable TCP protocol on fixed port 1433)
#
#mssql#db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
#mssql#db.url=jdbc:sqlserver://${db.host}:${db.port};databaseName=${db.name}
#mssql#db.txn.isolation=4096

#
# PostgreSQL connection (requires postgresql-8.2-504.jdbc3.jar or equivalent)
#
#postgres#db.driver=org.postgresql.Driver
#postgres#db.url=jdbc:postgresql://${db.host}:${db.port}/${db.name}

#
# Index Recovery Mode
#————-
#index.recovery.mode=Auto

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

#
# Alfresco Email Service and Email Server
#————-

# Enable/Disable the inbound email service.  The service could be used by processes other than
# the Email Server (e.g. direct RMI access) so this flag is independent of the Email Service.
#————-
#email.inbound.enabled=true

# Email Server properties
#————-
email.server.enabled=true
email.server.port=25
email.server.domain=alfresco.com
email.inbound.unknownUser=anonymous

# A comma separated list of email REGEX patterns of allowed senders.
# If there are any values in the list then all sender email addresses
# must match.  For example:
#   .*\@alfresco\.com, .*\@alfresco\.org
# Allow anyone:
#————-
email.server.allowed.senders=.*

#
# The default authentication chain
# To configure external authentication subsystems see:
# http://wiki.alfresco.com/wiki/Alfresco_Authentication_Subsystems
#————-
authentication.chain=alfrescoNtlm1:alfrescoNtlm

#
# IMAP
#————-
imap.server.enabled=true
imap.server.port=143
imap.server.host=localhost

#
# Lotus Quickr configuration options
#————-
lotus.ws.version=8.0.1
lotus.server.port=6060
lotus.server.host=localhost
lotus.share.document.url=http\://localhost\:8080/share/page/site/{0}/document-details?nodeRef\={1}
lotus.share.folder.url=http\://localhost\:8080/share/page/site/{0}/documentlibrary\#path\={1}
lotus.share.site.url=http://localhost:8080/share/page/site/{0}/dashboard

dranakan
Champ on-the-rise
Champ on-the-rise
il faut le configurer en mettant l'adresse de votre serveur de mail (et en avoir un…)

mail.host=Adresse_de_votre_serveur_mail
….

hajarsus
Champ in-the-making
Champ in-the-making
salut, voila la nouvelle configuration de mon fichier alfresco-global.properties :


###############################

## Common Alfresco Properties #

###############################



#

# Sample custom content and index data location

#————-

dir.root=/home/hajar/Alfresco/alf_data



#

# Sample database connection properties

#————-

db.name=alfresco

db.username=alfresco

db.password=alfresco

db.host=localhost

db.port=3306



#

# External locations

#————-

ooo.exe=/home/hajar/Alfresco/program/soffice

ooo.user=<%ShortInstallDir%>/alf_data/oouser

jodconverter.officeHome=/home/hajar/Alfresco

jodconverter.portNumbers=8101

#ooo.enabled=false

#jodconverter.enabled=true

img.root=/usr/local

swf.exe=/home/hajar/Alfresco/bin/pdf2swf



#

# Initial admin password

#————-

alfresco_user_store.adminpassword=2f3d1da5c069f11b8559b67d0873e0cd



#

# MySQL connection

#————-

db.driver=org.gjt.mm.mysql.Driver

db.url=jdbc:mysql://${db.host}:${db.port}/${db.name}



#

# Oracle connection

#

#oracle#db.driver=oracle.jdbc.OracleDriver

#oracle#db.url=jdbc:oracle:thin:@${db.host}:${db.port}:${db.name}



#

# SQLServer connection (note you must enable TCP protocol on fixed port 1433)

#

#mssql#db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver

#mssql#db.url=jdbc:sqlserver://${db.host}:${db.port};databaseName=${db.name}

#mssql#db.txn.isolation=4096



#

# PostgreSQL connection (requires postgresql-8.2-504.jdbc3.jar or equivalent)

#

#postgres#db.driver=org.postgresql.Driver

#postgres#db.url=jdbc:postgresql://${db.host}:${db.port}/${db.name}



#

# Index Recovery Mode

#————-

#index.recovery.mode=Auto



#

# Outbound Email Configuration

#————-

mail.host = smtp.gmail.com

mail.port = 465

mail.transport.protocol = smtp

mail.username = user@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



#

# Alfresco Email Service and Email Server

#————-



# Enable/Disable the inbound email service.  The service could be used by processes other than

# the Email Server (e.g. direct RMI access) so this flag is independent of the Email Service.

#————-

#email.inbound.enabled=true



# Email Server properties

#————-

#email.server.enabled=true

#email.server.port=25

#email.server.domain=alfresco.com

#email.inbound.unknownUser=anonymous



# A comma separated list of email REGEX patterns of allowed senders.

# If there are any values in the list then all sender email addresses

# must match.  For example:

#   .*\@alfresco\.com, .*\@alfresco\.org

# Allow anyone:

#————-

#email.server.allowed.senders=.*



#

# The default authentication chain

# To configure external authentication subsystems see:

# http://wiki.alfresco.com/wiki/Alfresco_Authentication_Subsystems

#————-

#authentication.chain=alfrescoNtlm1:alfrescoNtlm



#

# IMAP

#————-

#imap.server.enabled=true

#imap.server.port=143

#imap.server.host=localhost



#

# Lotus Quickr configuration options

#————-

lotus.ws.version=8.0.1

lotus.server.port=6060

lotus.server.host=localhost

lotus.share.document.url=http\://localhost\:8080/share/page/site/{0}/document-details?nodeRef\={1}

lotus.share.folder.url=http\://localhost\:8080/share/page/site/{0}/documentlibrary\#path\={1}

lotus.share.site.url=http://localhost:8080/share/page/site/{0}/dashboard

et ça marche toujours pas, quand je consulte la log, je trouve l'erreur suivante :

ERROR [org.alfresco.web.bean.TemplateMailHelperBean] Failed to send email to user@gmail.com
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Exception reading response;

hajarsus
Champ in-the-making
Champ in-the-making
ça marche, il fallait modifier le fichier core-services-context.xml

code :

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