Skip to Content
0

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

Oct 18, 2016 at 08:55 PM

76

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers