Handling errors in email.send(options)

N/email module – We can use the N/email module to send email messages from within NetSuite. You can use the N/email module to send regular, bulk, and campaign email.

email.send(options) – Sends email to an individual or group of recipients and receives bounceback notifications. A maximum of 10 recipients (recipient + cc + bcc) is allowed. The total message size including attachments must be 20MB or less. Also the size of each attachment cannot exceed 10MB.

Errors

Error CodeMessageThrown If
SSS_AUTHOR_MUST_BE_EMPLOYEEThe author internal id or email must match an employee.The author internal ID or email address doesn’t match an employee.
SSS_INVALID_TO_EMAILOne or more recipient emails are not valid.A recipient’s email address is invalid.
SSS_INVALID_CC_EMAILOne or more cc emails are not valid.An email address specified in the options.cc parameter is invalid.
SSS_INVALID_BCC_EMAIL
One or more bcc emails are not valid.
An email address specified in the options.bcc parameter is invalid
SSS_MAXIMUM_NUMBER_RECIPIENTS_EXCEEDEDYou may have a maximum number of 10 recipients.A total number of recipients (options.recipients + options.cc + options.bcc) exceeds 10.
SSS_MISSING_REQD_ARGUMENT{method name}: Missing a required argument: {param name}A required parameter is missing.
WRONG_PARAMETER_TYPEWrong parameter type: {param name} is expected as {param type}.A parameter’s type is incorrect.
SSS_FILE_CONTENT_SIZE_EXCEEDEDThe file content you are attempting to access exceeds the maximum allowed size of 10MB.An attachment exceeds the 10 MB file size limit.
ATTACH_SIZE_EXCEEDEDThis message exceeds the limit of 20 MB. Please reduce the size of the message and its attachments and try again.<br/>Note: Files can be larger when attached due to encoding.The size of the attachments exceeds the limit.

Leave a comment

Your email address will not be published. Required fields are marked *