Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

How to embed images stored in my app into an email using SendGrid?

Did you have chance to look at this?

what changes should I do to attach the image?

I ́ve tried several ways with no luck..

Regards

obullei
Posts: 0
Joined: Thu Jun 05, 2014 12:17 am

How to embed images stored in my app into an email using SendGrid?

Hello!

We are working on it.
I will let you know when have more information from developers team.

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

How to embed images stored in my app into an email using SendGrid?

I made a test directly on hotmail..If I paste this:

on the received email I got the same text.

But if I change on the menu options "Edit on HTML" and send this as a message:

I receive the image..this is exactly what I want to achive..

How can I made this while compousing the message using sendgrid?

Regards
Image Image

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

How to embed images stored in my app into an email using SendGrid?

Hello!

You can send not a text, but html (rename request parameter text in html) and add any tags including the img.
Please read more here
https://sendgrid.com/docs/API_Referen...

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

How to embed images stored in my app into an email using SendGrid?

Hi Evgene,

Sorry I didnt understand your suggestion, besides the link is broken...

Can you try to explain me again? and paste the correct sendgrid link??

Regards

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

How to embed images stored in my app into an email using SendGrid?

update:
After further reading, I understand what you mean..
So I replace the text parameter with html and add this for testing (see Screen shot)

And I receive the text along with the image in y email..

So my problem now, is how to add the tags to the images that are in DB and also to the text??

Regards

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

How to embed images stored in my app into an email using SendGrid?

update:
After further reading, I understand what you mean..
So I replace the text parameter with html and add this for testing (see Screen shot)

And I receive the text along with the image in the email..

So my problem now, is how to add the tags to the images "img" that are in DB and also to the text "p" ??

(the images are stored in the cart LSV)

Regards
Image

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

How to embed images stored in my app into an email using SendGrid?

Hi Alex,

Here is document about how to get URL to file in DB: http://devcenter.appery.io/documentat...

Base direct link view is:

precode

https://api.appery.io/rest/1/db/files/[databaseID]/[fileName]

/code/pre

You need to replace [databaseID] with your databaseID. http://prntscr.com/38wjfj/direct

And replace [fileName] with our file name. http://prntscr.com/38wjso/direct

Here is code example how to get img tag:

precode

var html = '<p>Hello user</p>';

&#47;&#47;You should use here your goal fileName&#46;
var fileName = "yourFileName&quot

&#47;&#47;Note: please replace "[databaseID]" with your DB id&#46;
var imageDirectURL = "https:&#47;&#47;api&#46;appery&#46;io/rest/1/db/files/[databaseID]/" + fileName ;
html += '<img src="' + imageDirectURL + '">';

&#47;&#47;now you can use this html variable to pass it in html request parameter&#46;

/code/pre

Regards.

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

How to embed images stored in my app into an email using SendGrid?

thanks Yurii...I did what you adviced and Its working now!!

Alex GG
Posts: 0
Joined: Thu Nov 14, 2013 11:11 pm

How to embed images stored in my app into an email using SendGrid?

Hi Yurii,
I have another problem with this App..(MusicShop App) (http://devcenter.appery.io/building-a...)

On Catalog screen, I have this JS code on click event of the list item (to select an instrument)

Apperyio.storage.instrument.set(Apperyio.storage.musical_instruments.get()[$(this).index()]);

(this is the same code as in the tutorial)

then I navigate to details page... Every works fine here..

*problem here*

I added a list (that is populated by a service from DB) with different categories. This list is inside a popup that opens on button click..

I created a model and a local Storage variable for this list...following the same procedure as the instruments list...

But when I click on any item on the list, this code is not working..

Apperyio.storage.category_selected.set(Apperyio.storage.categories.get()[$(this).index()]);

by checking in the DOM. the category_selected variable always holds the first element of the categories array...

is there any error on the above code?
why it works fine in the list of the catalog page, and fails in the popup list?

Regards

Return to “Issues”