Source: site.view [edit]
Function name: sendEmail
Arguments: to,subj,body
Description:
Page type: webl
Render function:  
Module: magicparties

Page source:


var APIKeyEnc = "U0cuQ2o4MVNMQlBUbGE4Sjh0Njl5Tmxtdy5halEyazRwSnhSQjFNVEFJUTViQmNyaW9HUlZDMExja3ptb29jUUh1WVJr";
var A = "Bearer " + Base64_Decode(APIKeyEnc);

var P = PostURL("https://api.sendgrid.com/api/mail.send.json", 
  [.  to=to,
      from="52p@magic-parties.com",
      subject=subj,
      html=body .],
  [. "Authorization" = A .]);


var redirect = `<head><meta http-equiv="refresh" content="0; URL='http://www.magic-parties.com'" /></head><body>Your message has been sent!</body>`;
NewPage(redirect, "text/html");