Is it possible to send an email with Sendgrid but have it originate from Server Code?
For example:
code
var address = encodeURI("https://api.sendgrid.com/api/mail.send.json?api_user=XXXX&api_key=XXXXX&to=me@example.com&from=admin@example.com&subject=New Connection&text=You have a new connection");
try{
var XHRResponse = XHR.send("GET",address,{
success: function(data){
console.log(data)
},
error:function(e){
console.log(e);
}
});
}catch(e){
/code
I tried this but it doesn't send an email, it does console log { message: 'success' } though. Do you know of any better way to do this? I use your backend for my website so I can't use the app builder method.