Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2015
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. Parse.Cloud.define("blendedBookMailToUser", function(request, response) {
  2. var Mailgun = require('mailgun');
  3. Mailgun.initialize('SandBoxCode', 'Key');
  4.  
  5. Mailgun.sendEmail({
  6. to: "someone@gmail.com",
  7. from: "me@me.com",
  8. subject: "Session Booked",
  9. text: "HIIIIIIIIIIII" ,
  10. html:'<html><body style="text-align:center;"><img border="0" src="' + request.params.qrUrlKey + '" width="200" height="200" ></body></html>',
  11.  
  12. }, {
  13. success: function(httpResponse) {
  14. console.log(httpResponse);
  15. response.success("Email sent!");
  16. },
  17. error: function(httpResponse) {
  18. console.error(httpResponse);
  19. response.error("Uh oh, something went wrong");
  20. }
  21. });
  22. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement