Hi,
We keeps getting error from sending email through SMTP. We are using Day CQ mail service to send email through our SMTP server. Since our SMTP server doesn't require username/password for sending email, so I put empty value for user/password this this configuration.
The 2 classes below are just for putting email template, sender, subject... to the HtmlEmail and send it by using com.day.cq.mailer.MessageGateway<Email>.
Here's the error log:
com.day.cq.mailer.MailingException: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.myco.com
at com.day.cq.mailer.impl.DefaultMailService.send(DefaultMailService.java:291)
at com.day.cq.mailer.impl.DefaultMailService.send(DefaultMailService.java:45)
at com.deloitte.aap.propertydatabase.core.services.Email.EmailServiceImpl.sendHtmlEmail(EmailServiceImpl.java:95)
at com.deloitte.aap.propertydatabase.core.servlets.CapitalandMailServlet$1.run(CapitalandMailServlet.java:213)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.myco.com
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1242)
at org.apache.commons.mail.Email.send(Email.java:1267)
at com.day.cq.mailer.impl.DefaultMailService.send(DefaultMailService.java:289)
... 4 common frames omitted
Caused by: javax.mail.AuthenticationFailedException: failed to connect, no password specified?
at javax.mail.Service.connect(Service.java:329)
at javax.mail.Service.connect(Service.java:176)
at javax.mail.Service.connect(Service.java:125)
at javax.mail.Transport.send0(Transport.java:253)
at javax.mail.Transport.send(Transport.java:124)
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232)
... 6 common frames omitted
And here's our Day CQ email configuration (I will hide my server information):
PID = com.day.cq.mailer.DefaultMailService
BundleLocation = jcrinstall:/libs/cq/platform/install/cq-mailer-5.10.8.jar
debug.email = true
from.address =
service.pid = com.day.cq.mailer.DefaultMailService
smtp.host = smtp.myco.com
smtp.password =
smtp.port = 25
smtp.ssl = false
smtp.user =
Please kindly assist, thanks.