« Back to full topics list
0
0

Hi,

I can’t find the correct syntax to use sendmail function with multiple recipients.
Is it possible ?

Regards,

Jérémie

ANSWERED
Marked as spam
Posted by - Asked on July 26, 2018 8:56 am - 28 views

1 Replies

0
Private reply

Hello Jérémie,

The built-in function sendMail does not support multiple recipients. However, you can use the following code snippet that supports passing an array of email addresses as recipient:

var sendEmailInput = {
	"apsma.to" : ["email1@domain.com", "email2@domain.com"],
	"apsma.subject" : "emailSubject",
	"apsma.htmlBody" : "emailBody",
	"apsma.senderName" : "yourName"
};

return apsdb.callApi("SendEmail", sendEmailInput, null);

Julien

Marked as spam
Posted by - Replied on July 26, 2018 11:16 am

It works perfectly, thanks !

Regards,

Jérémie

( at July 26, 2018 11:44 am)