on 09-16-2015 8:58 PM
Hi Experts ,
I am trying to send mail from HANA using gmail's smtp settings but not able to figure it out.
I have gone through the following blogs but could not find much help.
https://scn.sap.com/thread/3738248
Following is the smtp server settings:
Below is the XSJS code
//create email from JS Object and send
var mail = new $.net.Mail({
sender: {address: "*******@gmail.com"},
to: [{ address: "******@gmail.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);
Usually i am getting the following error
Error: error coulnd't establish connection (line 12 position 1 in *******/SEND_MAIL.xsjs)
Am I missing any step or something wrongly configured?
It would be great if somebody can help me on this.
Hello Pinaki,
port 25 for smtp.gmail.com is not supported anymore. You have to use 465 for SSL or 587 for TLS.
For both cases you have to change also Transport Security Setting from "None" to "SSL/TLS".
Depending on your account setup the trust store configuration can be necessary too.
What also has to be checked is, if your HANA system can connect on network level to the SMTP server (maybe e.g. some firewall settings do not allow that).
If your system is behind a proxy, you also have to specify the proxy information in the HANA SMTP configuration.
Best Regards,
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Florian ,
Thanks for the reply .I tried with the following settings for office 365.But getting error..
Found the following errors:
===========================
Error: error coulnd't get certificate (line 12 position 1 in /user_work/PinakiP/LEARNINGS/XSJS/XSJS/SEND_MAIL.xsjs)
I am not sure about the trust store configuration.Any help in regards to that ?
Hello,
you need to create an own trust store for smtp.office365.com. The SAPLOGON trust store is not valid for this of course.
Hints:
Best Regards,
Florian
Hi Pinaki,
I am also getting same problem and unable to send mails but previous with configuring the mail was sent perfectly but now its not working...
Are you able to send mail now?
Thanks
Varathan A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried the same thing with smtp.office365.com and port 587 but did not worked for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.