Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

SendGrid API - using template

How do I use a template mail item with the Appery API for Sendgrid? I want to use a template which will have company logo on and just add the message body and subject.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

SendGrid API - using template

Hi Aeneas,

Unfortunatly this is not specified with Appery.io platform.

You can use all JS templating processing which is you need.

Regards.

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

SendGrid API - using template

Hi Yurri,

How do I use JS templating to do this? I am quite new to js. I basically just want to add a banner/picture at the tope of the email and send it in html.

Thanks,
Aeneas

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

SendGrid API - using template

Aeneas,

I guess you can add this information to your body without templating.

Just concatenate strings with JS.

For example:

var body = "<h1Dear user,</h1";
body += '<Imagehttp://hereisyour.image.url" rel="nofollow"http://hereisyour.image.url/a"';
body += "<phere you can add some infor</p";

Then you can use this "body" variable in sendgrid.

Regards.

Aeneas McBurney
Posts: 0
Joined: Mon Jun 16, 2014 7:49 am

SendGrid API - using template

That's great thanks. How do I use this part

http://hereisyour.image.url

to refer to an image in the app media library? Can this be done?

Thanks,
Aeneas

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

SendGrid API - using template

You need to specify path to the image source.
For example "http://appery.io/app/view/95800416-80..."

You will need to make your app public to change appId.

Return to “Issues”