Hi all,
I am trying to send mail from Hana XSJS by configuring the SMTP and getting the following error.
error connection denied
PFB the SMTP Configuration and XSJS please let me know the error.
SMTP Configuration:
XSJS Code
var smtpConnection = new $.net.SMTPConnection(); try{ var mail = new $.net.Mail({ sender: {address: "**********@gmail.com"}, to: [{ address: "***********@gmail.com"}], subject: "XSJS Email Test", subjectEncoding: "UTF-8", parts: [ new $.net.Mail.Part({ type: $.net.Mail.Part.TYPE_TEXT, text: "The body of the mail.", contentType: "text/html", encoding:"UTF-8" })] }); var returnValue = mail.send(); var response = "MessageId = " + returnValue.messageId + ", final reply = " + returnValue.finalReply; $.response.status = 200; $.response.status = $.net.http.OK; $.response.setBody(response); }catch(err){ $.response.status = $.net.http.BAD_REQUEST; $.response.setBody(err.message); }
Thanks in Advance