Page 2 of 4

email array to sendgrid

Posted: Thu Apr 24, 2014 4:54 pm
by Kateryna Grynko

Hi Nathan,

Try running service via service Test tab please. Let's see what's wrong.


email array to sendgrid

Posted: Thu Apr 24, 2014 4:55 pm
by Kateryna Grynko

Hi Casey,

Do you need any help with Sendgrid?


email array to sendgrid

Posted: Thu Apr 24, 2014 5:02 pm
by Nathan Morin

Katya-

I have already tested this many times and it isn't working. So I am not sure what you want me to do here. Please advice. Thanks.

Cheers,

Nathan


email array to sendgrid

Posted: Thu Apr 24, 2014 5:07 pm
by casey palmer

No Thank you. I got the features I need through the Mandrill email service.


email array to sendgrid

Posted: Thu Apr 24, 2014 5:08 pm
by Nathan Morin

Katya-

I have attached a png of a screen shot from the Network Tab in Developer Tools. Does this information help?

Cheers,

Nathan Image


email array to sendgrid

Posted: Thu Apr 24, 2014 5:13 pm
by Kateryna Grynko

Nathan,

I mean testing in service Test tab: Image


email array to sendgrid

Posted: Thu Apr 24, 2014 5:14 pm
by Nathan Morin

Casey - Thanks for this idea. If we can not get SendGrid to work, I will look into this. Thanks. How did you implement Mandrill into your application?

Cheers,

Nathan


email array to sendgrid

Posted: Thu Apr 24, 2014 5:37 pm
by Nathan Morin

Katya-

Yeah, testing isn't possible because of Step 2 above. I had to delete the To line. So when I test it shows destination email missing.

Did you see the screenshot I posted below from Developer Tools. That shows exactly what is happening. Please review that screen shot. Thanks.

Cheers,

Nathan


email array to sendgrid

Posted: Thu Apr 24, 2014 5:45 pm
by casey palmer

I created the service and then pointed it at the designated mandrill URL. Im using a template and its "https://mandrillapp.com/api/1.0/messa..." (FYI - They have pretty good documentation on their API. Im. not a programmer by trade so you will have to excuse me if i say something incorrectly....

since Im using the template in Mandrill I have 2 request prameters

template_name (if you use template just the name you give it in Mandrill
message (just javascript)

once i added the service to did not map anything.. just put all my code in the "message" parameter... grabbed my info from local storage. since I used an HTML Template in Mandrill they have what is called merge tags.. "|data|" so you can have placeholders in your HTML and replace when you send from your app..

the JavaScript in the message parameter just gets the local storage then put this in the format to send to Mandrill.

for the global merge vars below the "name" is telling it what merge var to look for and the "content' is what to replace it with..

return {
"html": "",
"text": "",
"subject": subject,
"from_email": fsremail,
"from_name": fsrname,
"to": [
{
"email": sendto,
"name": "Spare Parts Coordinator",
"type": "to"
},

Code: Select all

         { 
             "email": fsremail, 
             "name": fsrname, 
             "type": "cc" 
         }, 

         { 
             "email": "a href="mailto:bob@aol.com" rel="nofollow"bob@aol.com/a", 
             "name": "Casey Palmer", 
             "type": "bcc" 
         } 

     ], 

     "global_merge_vars": [ 
         { 
             "name": "fsrname", 
             "content": fsrname, 
         }, 

         { 
             "name": "fsrworkcenter", 
             "content": fsrworkcenter, 
         },  

         { 
             "name": "custname", 
             "content": custname, 
         },  

I hope this helps and did not confuse to much..


email array to sendgrid

Posted: Thu Apr 24, 2014 5:48 pm
by Nathan Morin

Thanks. I just signed up for Mandrill and this helps a ton. Thanks for this!