Page 2 of 2

Filter Response

Posted: Wed Mar 25, 2015 6:38 pm
by Bruce Stuart

Vinny ,

From your post, and please correct me, it appears that you are trying to send an email based on the items that get returned from a service call ... A query on a collection?

So, when the query executes, you have a result set that you want to spin through and that's what you are sending the email from?

It sounds like you are displaying the results after the query is done and the results are displayed on the UI ??

Is the are button the user then clicks to send an email of what is displayed ? Or describe the use case in more detail ?

Best,

Bruce


Filter Response

Posted: Wed Mar 25, 2015 7:13 pm
by Vinny B

Hello Cant thank you enough - thank you

1) I am creating a list that the customer views from database
2) Customer clicks a button and list is emailed to them.

For now Ill be happy getting a blank email sent using this code and work on sending the list later.

here are some images of what I have done.

my problem now is i get an error ( POST https://api.appery.io/rest/1/proxy/tu... 400 (Bad Request) ) errors: ["Bad username / password"]
0: "Bad username / password"
message: "error"

Image

Image

Image

Image


Filter Response

Posted: Wed Mar 25, 2015 7:29 pm
by Vinny B

my error

{
"status":400,
"uri":"https://api.sendgrid.com/api/mail.sen...",
"response":{
"message":"error",
"errors":[
"Permission denied, wrong credentials"
]
}
}


Filter Response

Posted: Wed Mar 25, 2015 8:10 pm
by Vinny B

I figured it out only took 8 hours..

I used your code and yurii code to get it to work. now I have to populate it with the data from the list.

Thanks again


Filter Response

Posted: Wed Mar 25, 2015 8:41 pm
by Bruce Stuart

Awesome ... In terms of getting the data from the list ... Keep in mind that in the success event of your service call ... You have visibly to the data that comes back as an array ... You can process your email there into the text body of your email ... Or you can stringify the result, save it to localstorage and then read it back into an array in another event for processing into your email.


Filter Response

Posted: Wed Mar 25, 2015 8:44 pm
by Bruce Stuart

If you need an example ... Let me know ...


Filter Response

Posted: Wed Mar 25, 2015 11:08 pm
by Vinny B

using your code example and combining it with yuri code from another post i was able to populate the list into an email.

Thanks again.
Vinny


Filter Response

Posted: Thu Mar 26, 2015 3:36 am
by Bruce Stuart

Sweet - very nice job.... Glad you got the end result you were looking for!