Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

SMTP mail configuration using an API key rather than a username and password.

Avatar

Level 3

Hi Community,

 

Now Currently, I am using AEM default SMTP mail configuration.

 

{
"smtp.host": "$[env:AEM_PROXY_HOST;default=proxy.tunnel]",
"smtp.port": "30465",
"smtp.user": "xyz",
"smtp.password": "123",
"from.address": "",
"smtp.ssl": true,
"smtp.starttls": false,
"smtp.requiretls": false,
"debug.email": false
}

 

But now I want to change the SMTP mail configuration using an API key rather than a username and password. using it as an AEM Cloud manager.

Is it possible or Can I do that?

 

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Vishal_S01 

 

This blog provides details on how the SMTP Oauth2 can be configured - https://aemconcepts.com/home/smtp-integration-with-aemaacs-over-oauth-2-0/

 

I hope this helps. Please let us know for any questions.

 

Thanks

Narendra

View solution in original post

7 Replies

Avatar

Community Advisor

Yes it is possible. For few of the connections only host and port is enough and we can send emails without username and password as well.

On our system we have whitelisted the aem server on our end and sending email without any credential only from whitelisted domain.

Go to http://localhost:4502/system/console/configMgr and find Day CQ Mail Service

 We are not using any credential hrere

kaikubad_0-1706523860429.png

 

Avatar

Level 3

Hi @kaikubad,

But now here I'd like to set this up using an API key rather than a username password as it is.

means I want to add an API key here. Where do I need to change in the current configuration?

Avatar

Community Advisor

No ootb functionality for this. But recently they added oauth for mail service. You can check this link
https://experienceleague.adobe.com/docs/experience-manager-65/content/sites/administering/operations...

 

another way could be overriding the Day CQ Mail service as your need.

Avatar

Level 3

 

I have checked the AEM official docs.

https://experienceleague.adobe.com/docs/experience-manager-learn/cloud-service/networking/examples/e...

 

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

 

But, as per the AEM docs they have mentioned here.

Avatar

Correct answer by
Community Advisor

Hi @Vishal_S01 

 

This blog provides details on how the SMTP Oauth2 can be configured - https://aemconcepts.com/home/smtp-integration-with-aemaacs-over-oauth-2-0/

 

I hope this helps. Please let us know for any questions.

 

Thanks

Narendra

Avatar

Administrator

@Vishal_S01 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni