How to email using SuiteScript in Sandbox?

const senderId = 35111 // employee id
const recipientEmail = [‘firstTest@gmail.com’, ‘secondTest@company.com’];
const recipientCCEmail = [‘thirdTest@gmail.com’, ‘fourthTest@company.com’];
email.send({
        author: senderId,
        recipients: recipientEmail,
        cc: recipientCCEmail,
        subject: ‘Test:  license code’,
        body: `There is not enough license code for this order.
        Please add more license code for sku: 1234`,
        relatedRecords: {
                entityId: recipientId
        }
});
I get an email on my company’s email on (35111) and next to the subject I get (officially to: firstTest… secondTest… officially cc: thirdTest… fourthTest.
None of the other email is getting an email. I release the Script, this is on sandbox, only the sender is receiving the email.
Rookie Asked on July 12, 2023 in SuiteScript.
Add Comment
2 Answer(s)

Sandbox accounts intentionally do not send emails externally.

You can read more in the section about Sandbox and Release Preview accounts here:

https://suiteanswers.custhelp.com/app/answers/detail/a_id/43391/loc/en_US

Intermediate Answered on July 13, 2023.
Add Comment

Hi Chris,

That makes total sense to why the external email shows in parentheses. Thanks for fast respond, explanation and the link with additional information.

Rookie Answered on July 13, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Limebox   Become a Sponsor   Become a Sponsor