Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3575

Unable to send email from sap hana using XSDS

$
0
0

Hi Team,

 

I am getting this "error coulnd't establish connection" error when i am trying to send the mail.

 

Could please help me to resolve issue?

 

Here I have attached the snapshots

 

 

Code 1:

var mail = new $.net.Mail({

        sender: {address: "varathan.cs@gmail.com"},

        to: [{ address: "varathan.cs@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;

 

 

Code 2:

var smtpConnection = new $.net.SMTPConnection();

    responseBody+="3"+smtpConnection;

    var toAddress=[{address : "varathan.cs@gmail.com"}];

 

        var mail = new $.net.Mail({

            sender : {

                address : "varathan.cs@gmail.com"

            },

            to : toAddress,

            subject : subject,

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

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

                text : body,

                contentType : "text/plain"

            }) ]

        });

        responseBody+="4";

        var returnValue = smtpConnection.send(mail);

 

Thanks

 

Varathan A


Viewing all articles
Browse latest Browse all 3575

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>