Hoken
Posts: 0
Joined: Mon Apr 08, 2013 5:32 pm

SendGrid Mail API, Attachment?

Hi, I' new to Tiggzi and is now struggling with my first app! I want to take a picture with the mobile camera and then e-mail it as an attachment.

I'm using the SendGrid Mail API plugin and got the camera stuff working. I can also send emails from the phone.
Now, I want to attach the picture... I have the picture in a mobilepicture container and also the local path to the file. I've tried to add a "files[file1.jpg]" request parameter and filled it with the path to the file (with a mapping).
When I receive the email there is an attachment icon but without the picture data...
Any ideas?

http://sendgrid.com/docs/API_Referenc...

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

SendGrid Mail API, Attachment?

Hello,

We'll test this.

Hoken
Posts: 0
Joined: Mon Apr 08, 2013 5:32 pm

SendGrid Mail API, Attachment?

Thanx!

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

SendGrid Mail API, Attachment?

Hi,

To add an attachment to mail, parameter files[file1.jpg] should contain binary data of the file. Unfortunately, you can't do it with Tiggzi due to JavaScript restrictions.

Hoken
Posts: 0
Joined: Mon Apr 08, 2013 5:32 pm

SendGrid Mail API, Attachment?

Hmmm... What is the proper way of getting images out of the phone then!? Is there another way?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

SendGrid Mail API, Attachment?

We will try to find it. On what device are you trying to do this?

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

SendGrid Mail API, Attachment?

Even though sending binary data is not yet possible via Tiggzi defined service, you can send binary data if you write the service request in JavaScript.

Hoken
Posts: 0
Joined: Mon Apr 08, 2013 5:32 pm

SendGrid Mail API, Attachment?

OK, That sounds good! I will give it a try.

Hoken
Posts: 0
Joined: Mon Apr 08, 2013 5:32 pm

SendGrid Mail API, Attachment?

Is there an example somewere that I can use as a starting point?
Thank you.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

SendGrid Mail API, Attachment?

Hi,

I would recommend you these references:

Work with Rest Services via JavaScript - https://developer.mozilla.org/en-US/d...
Sending binary data via JavaScript - https://developer.mozilla.org/en-US/d...
New Tricks in XMLHttpRequest2 - http://www.html5rocks.com/en/tutorial...

Return to “Issues”