[Locked, wrong forum] AEM Email Services

New Here ,
Mar 27, 2020

Copy link to clipboard

Copied

Hi,

We are currently using AEM Email Services(acs-aem-commons-bundle-3.18.2.jar) for sending out an html email. 

 

Example code:

 

Using the Email API to send mails

The EmailService is an OSGi service and can be injected using @Reference in the calling class.

	@Reference
	EmailService emailService;

	emailService.sendEmail(templatePath, emailParams, recipients);



 

Our email template is like below

en.html:

From: admin@adobe.com
Subject: Greetings
CC: ${ccrecipient}
BCC: ${bccrecipient}

<div style="color: blue;">

Hello ${recipientName}

Find your message here: ${message}

From,
Adobe Team

 

 

Could you please clarify how to include conditional field in this email template. Like, we need to add a conditiona like below as like velocity or freemarker email templates.

 

if condition 1 then {$message} else {$message2}

 

Please assit

TOPICS
Libraries

Views

183

Likes

Translate

Translate

Report

Report
This conversation has been locked.

[Locked, wrong forum] AEM Email Services

New Here ,
Mar 27, 2020

Copy link to clipboard

Copied

Hi,

We are currently using AEM Email Services(acs-aem-commons-bundle-3.18.2.jar) for sending out an html email. 

 

Example code:

 

Using the Email API to send mails

The EmailService is an OSGi service and can be injected using @Reference in the calling class.

	@Reference
	EmailService emailService;

	emailService.sendEmail(templatePath, emailParams, recipients);



 

Our email template is like below

en.html:

From: admin@adobe.com
Subject: Greetings
CC: ${ccrecipient}
BCC: ${bccrecipient}

<div style="color: blue;">

Hello ${recipientName}

Find your message here: ${message}

From,
Adobe Team

 

 

Could you please clarify how to include conditional field in this email template. Like, we need to add a conditiona like below as like velocity or freemarker email templates.

 

if condition 1 then {$message} else {$message2}

 

Please assit

TOPICS
Libraries

Views

184

Likes

Translate

Translate

Report

Report
Mar 27, 2020 0
Most Valuable Participant ,
Mar 27, 2020

Copy link to clipboard

Copied

There is no forum for that product here, you need to go to https://experienceleaguecommunities.adobe.com/

Likes

Translate

Translate

Report

Report
Mar 27, 2020 0