cancel
Showing results for 
Search instead for 
Did you mean: 

outbound email randomly fails

e-no91
Champ in-the-making
Champ in-the-making
I keep having this problem. It occurs randomly everytime I make a change to share (even when manage rule on document) or restart alfresco. My error is either
i) [org.alfresco.repo.action.executer.MailActionExecuter] Failed to send email to xxx@gmail.com
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Unknown SMTP host: smtp.gmail.com;
  nested exception is:
   java.net.UnknownHostException: smtp.gmail.com. Failed messages: javax.mail.MessagingException: Unknown SMTP host: smtp.gmail.com;

ii)  [org.alfresco.repo.management.subsystems.ChildApplicationContextFactory] Startup of 'email' subsystem, ID: [email, outbound] failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mail' defined in file [C:\Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\subsystems\email\OutboundSMTP\outboundSMTP-context.xml]: Invocation of init method failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: 04210000 email.outbound.err.send.failed

I'm wondering does this have to do with Internet connection?
2 REPLIES 2

g_rathod
Star Contributor
Star Contributor
Hi e-no91,

Did you make any changes in alfresco-global.properties?
Did your subsystem setting and alfresco-global.properties conflicts?
Can you post setting you have configured.

echiboka
Champ in-the-making
Champ in-the-making
Guys i have configured my gmail email with the following details:
### E-mail setup ###
mail.host=smtp.gmail.com
mail.port=465
mail.username=myusername@gmail.com
mail.password=my password
mail.encoding=UTF-8
mail.from.default=blueflame.engineering@gmail.com
mail.protocol=smtps
mail.smtps.starttls.enable=true
mail.smtps.auth=true


#use these properties to send test message during start of subsystem
mail.testmessage.send=true
mail.testmessage.to=sujayopillai@gmail.com
mail.testmessage.subject=Outbound SMTP
mail.testmessage.text=The Outbound SMTP email subsystem is working.

But i keep getting this error:

Caused by: org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Unknown SMTP host: smtp.gmail.com;
  nested exception is:
   java.net.UnknownHostException: smtp.gmail.com. Failed messages: javax.mail.MessagingException: Unknown SMTP host: smtp.gmail.com;
  nested exception is:
   java.net.UnknownHostException: smtp.gmail.com; message exceptions (1) are:
Failed message 1: javax.mail.MessagingException: Unknown SMTP host: smtp.gmail.com;
  nested exception is:
   java.net.UnknownHostException: smtp.gmail.com
   at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:400)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:340)
   at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:336)
   at org.alfresco.repo.action.executer.MailActionExecuter.sendEmail(MailActionExecuter.java:929)
   … 46 more

Please what am i doing wrong.