How to Send Email in SuiteScript2.0? Equivalent of nlapiSendEmail().

Hi All,

Please use below code to send email in SuiteScript2.0:

In SuiteScript1.0:

     nlapiSendEmail(author, recipient, subject, body, cc, bcc, records, attachments, notifySenderOnBounce, internalOnly, replyTo)

In SuiteScript2.0:

       email.send(options)
or
       email.sendBulk(options)

Module Used:

       N/email Module

Please comment if you have any question.

Thanks

Abhi



Comments

  1. I see issue in sending attachment for email when it is a scheduled script . is there anything one needs to set up to get attachment.

    ReplyDelete
    Replies
    1. can you please provide code example , I never saw such issue,
      Only limitation is that script should load all file and push into array (if there are multiple attachments) and then send using email api.

      Delete
  2. Hello, Can you provide full code for email sending.

    ReplyDelete
    Replies
    1. Hi ,
      Please give me email id I will forward it to you.or message on contact me with email id I will forward.

      Delete
  3. i have written a scheduled job script in SuiteScript 2.0.
    When i test my job with NS debugger then email is triggered. But when it is run as scheduled job it does not trigger email. This is happening in sandbox account.

    ReplyDelete
    Replies
    1. In Sandbox,
      Email trigger but never go to real email id.
      Please check preference to get email on loggedin email id.

      Delete

Post a Comment

Thanks for you message, please join us on Facebook and Linkedin