Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
[ FlexSim 23.0.0 ]
Hi There,
I'm trying to send the mail using Flexsim HTTP API by Gmail SMTP.
I created gmail app password also.
I'm using below code to send but its not working. can you correct this
Http.Request r;
r.method = Http.Method.Post;
r.useSSL = 1;
r.port = 465;
r.host = "smtp.gmail.com";
r.path = "";
r.headers = "Content-Type: text/plain;charset=utf-8\r\nFrom: jal.business.process@gmail.com\r\nTo: vinay.s@jindalaluminium.com\r\nSubject: JAL Test mail\r\nAuthorization: Basic amFsLmJ1c2luZXNzLmNvbS53anF1eWVsdWF4bXF2ZDp3anF1eWVsdWF4bXF2ZA==\r\nHello JAL BP.";
r.successCallback = model.find("/Tools/success");
r.failCallback = model.find("/Tools/fail");
r.send();
Solved! Go to Solution.