Expand my Community achievements bar.

Who Me Too'd this topic

Avatar

Community Advisor

Hi there, 

We currently have the com.day.cq.mailer.DefaultMailService configured to use gmail smtp service, works fine. 

 

But now we are switching to another smtp server where no authentication is needed, the dedicated egress ip is whitelisted on smtp side so everything should be enabled to properly handle incoming requests from AEM to port 25.

 

question then is, for the port forwards rule, is it enough to change the current working port forward config:

 

"portForwards": [{
"name": "smtp.gmail.com",
"portDest": 465,
"portOrig": 30002
}]

to 

"portForwards": [{
"name": "ip.address.goes.here",
"portDest": 25,
"portOrig": 30002
}]

note that no domain name is used, only ip

 

 

and the working mail service is currently configured like this:

 

{
    "smtp.host": "$[env:AEM_PROXY_HOST;default=proxy.tunnel]",
    "smtp.port": "30002",
    "smtp.user": "$[env:EMAIL_USERNAME;default=emailapikey]",
    "smtp.password": "$[secret:EMAIL_PASSWORD]",
    "from.address": "sender@example.com",
    "smtp.ssl": true,
    "smtp.starttls": false,
    "smtp.requiretls": true,
    "debug.email": false,
    "oauth.flow": false
}
 
is it enough to only keep this as below or how would it be configured properly?
 
{
    "smtp.host": "$[env:AEM_PROXY_HOST;default=proxy.tunnel]",
    "smtp.port": "30002",
    "from.address": "sender@example.com",
    "smtp.ssl": true,
    "smtp.starttls": false,
    "smtp.requiretls": true,
    "debug.email": false,
    "oauth.flow": false
}
 
been trying back and forth with different configurations and with the configurations above we keep getting this error:
 
com.day.cq.mailer.MailingException: org.apache.commons.mail.EmailException: Sending the email to the following server failed : proxy.tunnel:30002
Who Me Too'd this topic