Issues With Send Email AEMaaCS | Adobe Higher Education
Skip to main content
dante8888
Level 2
January 8, 2025
Respondido

Issues With Send Email AEMaaCS

  • January 8, 2025
  • 2 respostas
  • 905 Visualizações

Hi everyone,

I have configured the email notification in AEM Cloud, but I am still experiencing a timeout.
The error message is as follows:
"Sending the email to the following server failed: email-smtp.<<name>>.com:465
Couldn't connect to host, port: email-smtp.<<name>>.amazonaws.com, 465; timeout 30000"

* com.day.cq.mailer.DefaultMailService.cfg.json

{
"debug.email": "true",
"smtp.host": "$[env:SMTP_HOST;default=]",
"smtp.password": "$[secret:SMTP_PASSWORD;default=]",
"from.address": "$[env:SMTP_FROM_ADDRESS;default=]",
"smtp.port": "465",
"smtp.ssl": "true",
"smtp.user": "$[env:SMTP_USER;default=]"
}

 ERROR:

com.day.cq.mailer.MailingException: org.apache.commons.mail.EmailException: Sending the email to the following server failed : email-smtp.<<name>>.amazonaws.com:465
at com.day.cq.mailer.impl.DefaultMailService.send(DefaultMailService.java:334) [com.day.cq.cq-mailer:5.15.2]
at com.day.cq.mailer.impl.DefaultMailService.send(DefaultMailService.java:46) [com.day.cq.cq-mailer:5.15.2]
at com.adobe.acs.commons.email.impl.EmailServiceImpl.sendEmail(EmailServiceImpl.java:194) [com.adobe.acs.acs-aem-commons-bundle:5.4.0]
at com.adobe.acs.commons.email.impl.EmailServiceImpl.sendEmail(EmailServiceImpl.java:221) [com.adobe.acs.acs-aem-commons-bundle:5.4.0]
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266) [org.apache.sling.api:2.27.6]
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) [org.apache.sling.api:2.27.6]
at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) [org.apache.sling.api:2.27.6]
at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:544) [org.apache.sling.engine:2.15.18]
 

But in local i sents successfully, and in smpt user i don't set any permission boundary,

Please help any idea with it. Please suggest to me,

Many Thanks

Este tópico foi fechado para respostas.
Melhor resposta por daniel-strmecki

Hi @dante8888,

I think you will need to add port forwarding, which can be done on AEMaaCS through Advanced Networking: https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/security/configuring-advanced-networking#flexible-port-egress

Here is an example from my project:

{ "portForwards": [ { "name": "smtp.testmail.io", "portDest": 2525, "portOrig": 30001 }, { "name": "smtp.testmail.io", "portDest": 465, "portOrig": 30002 } ] }

 

Good luck,

Daniel

2 Respostas

daniel-strmecki
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
January 8, 2025

Hi @dante8888,

I think you will need to add port forwarding, which can be done on AEMaaCS through Advanced Networking: https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/security/configuring-advanced-networking#flexible-port-egress

Here is an example from my project:

{ "portForwards": [ { "name": "smtp.testmail.io", "portDest": 2525, "portOrig": 30001 }, { "name": "smtp.testmail.io", "portDest": 465, "portOrig": 30002 } ] }

 

Good luck,

Daniel

Level 4
January 23, 2025

As per the documentation we should update the osgi configuration similar to the below one 

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

 And the 

"smtp.port": "30587",

  shoud be passed in port-forwarding