Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Parse.Cloud.define("blendedBookMailToUser", function(request, response) {
- var Mailgun = require('mailgun');
- Mailgun.initialize('SandBoxCode', 'Key');
- Mailgun.sendEmail({
- to: "someone@gmail.com",
- from: "me@me.com",
- subject: "Session Booked",
- text: "HIIIIIIIIIIII" ,
- html:'<html><body style="text-align:center;"><img border="0" src="' + request.params.qrUrlKey + '" width="200" height="200" ></body></html>',
- }, {
- success: function(httpResponse) {
- console.log(httpResponse);
- response.success("Email sent!");
- },
- error: function(httpResponse) {
- console.error(httpResponse);
- response.error("Uh oh, something went wrong");
- }
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement