Frederick RajKumar
Frederick RajKumar

Reputation: 228

nlapiSenEmail API is Not sending email in Scheduled Script

Am new to netsuite development. I have created a suitescript of scheduled script type. In that i use the following code

nlapiSendEmail(473882, '[email protected]','Test','Test', null, null, null);

The above code is sending email at the time of debuggin using Netsuite Script Debugger. When we create scheduled record and deployed the same code and scheduled for testing it is not sending the code and not even shows any errors. Can anyone help in this

Upvotes: 1

Views: 1461

Answers (3)

Ito
Ito

Reputation: 21

In my case the "problem" was that I was just working in the Sandbox, as I prepared a snippet to test email sending in production everything went right.

Upvotes: 0

Rusty Shackles
Rusty Shackles

Reputation: 2840

Also are you testing this in your sandbox account? Sandbox accounts have limitations in sending out emails.

Upvotes: 2

Saqib
Saqib

Reputation: 2480

Check the permissions of schedule script. Make sure the script is running as Administrator role.

Alternatively run the script from the same user as the from parameter of the function. 473882 in your case.

Upvotes: 0

Related Questions