Skip to Content
0
Former Member
Oct 18, 2016 at 08:55 PM

XSJS - unable to send email throws error "error couldn't send MAIL FROM header"

335 Views

I'm trying to send email from XSJS code but not able to send email ,It throws me error as below,

"error couldn't send MAIL FROM header"

Could you please assist on the same .

var mail = new $.net.Mail({

sender: {address: "abc@abc.com"},

to: [{ address: "xyz@abc.com"}],

subject: "XSJS Email Test",

parts: [ new $.net.Mail.Part({

type: $.net.Mail.Part.TYPE_TEXT,

text: "The body of the mail.", contentType: "text/plain" })]

});

var returnValue = mail.send();

var response = "MessageId = " + returnValue.messageId + ", final reply = " + returnValue.finalReply; $.response.setBody(response);

Thanks