Expand my Community achievements bar.

Who Me Too'd this topic

Avatar

Level 3

Dear folks ,

We are using default mail service to send emails but we are facing issue to send emails. We have used below OSGI configuration and from local system we can send email but not from AEM cloud.
OSGI Config :

{
"smtp.host": "$[env:AEM_PROXY_HOST;default=proxy.tunnel]",
"smtp.port": "30587",
"smtp.user": "$[env:EMAIL_USERNAME;default=1ec6dcbd9bf44864a6d506ae22d48026]",
"smtp.password": "$[secret:EMAIL_PASSWORD]",
"from.address": "abcd@xyz.com",
"smtp.starttls": true,
"smtp.requiretls": false,
"debug.email": false,
"oauth.flow": false
}


ERROR :

Caused by: org.apache.commons.mail.EmailException: Sending the email to the following server failed : proxy.tunnel:30587
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1469) [org.apache.commons.email:1.5.0]
at org.apache.commons.mail.Email.send(Email.java:1496) [org.apache.commons.email:1.5.0]
at com.day.cq.mailer.impl.DefaultMailService.send(DefaultMailService.java:331) [com.day.cq.cq-mailer:5.4.22]
... 160 common frames omitted
Caused by: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: proxy.tunnel, 30587; timeout 60000
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2209) [com.sun.mail.javax.mail:1.6.2]
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:740) [com.sun.mail.javax.mail:1.6.2]
at javax.mail.Service.connect(Service.java:388) [com.sun.mail.javax.mail:1.6.2]
at javax.mail.Service.connect(Service.java:246) [com.sun.mail.javax.mail:1.6.2]
at javax.mail.Service.connect(Service.java:195) [com.sun.mail.javax.mail:1.6.2]
at javax.mail.Transport.send0(Transport.java:254) [com.sun.mail.javax.mail:1.6.2]
at javax.mail.Transport.send(Transport.java:124) [com.sun.mail.javax.mail:1.6.2]
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1459) [org.apache.commons.email:1.5.0]
... 162 common frames omitted
Caused by: java.net.UnknownHostException: proxy.tunnel

NOTE : We are using outlook as email service provider and we came to know from document that port 587 need to be enabled but not sure about that.
Any suggestion from anyone will be of great help to us.

Kind Regards,
Kaushik Datta

Who Me Too'd this topic