theLebanondon
Posts: 0
Joined: Fri Mar 01, 2013 1:19 am

Send array as text using sendgrid?

can someone help me send an array to an email using sendgrid?
i want it to look just like this guys example..
https://getsatisfaction.com/apperyio/...

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Send array as text using sendgrid?

Hello,

If we understood you correctly you want send multiple "to" emails.
Unfortunately there is not available multiple addresses in this plugin by default.
But if you want to do it you can try next steps:

1 open Services-SendGrid_MailSend.

2 Request. Delete "to" parameter.

3 Invoke service using javascript code:

pre
code
sendgrid_mailsend.execute({data: {"to[]": ["yourfirstEmail@sss.com", "yoursecondEmail@sss.com"]} });
/code
/pre
It will generate request with multiple to[] parameters. Please check request/response in the browser console "Network".

theLebanondon
Posts: 0
Joined: Fri Mar 01, 2013 1:19 am

Send array as text using sendgrid?

no it only needs to be sent to one person but i would like to enter user info as an array into the text parameter just like in the image below.

Image

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Send array as text using sendgrid?

Do you want to use email body text with array inside?
Could you show what exactly you tried and what doesn't work?

theLebanondon
Posts: 0
Joined: Fri Mar 01, 2013 1:19 am

Send array as text using sendgrid?

yes id like to put an array inside the body if possible.. basically upon sign up users are required to fill out a form and upload two files into the database. I need to take that new user info, along with the files, and send it to a single email address using the Sendgrid api. I have a server side code that takes the "_id" and outputs the user's info into an array. Now i need to take this array and somehow implement it into some type of sendgrid parameter(text, header, SMTPAPI?) so that it displays in the email. How can I add extra parameters or find a way to include user info (name,address,email,city,DOB,etc....) to appear in the email?

im having trouble mapping the array response from my server code to the request response from the sendgrid service..

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

Send array as text using sendgrid?

Hi,

In this tutorial tutorial there is an example of code that sends email. In response parameters, use this code to send the array:pre"text": JSON.stringify(arr)/preWhere 'text' is a XHRResponse parameter,
'arr' is an array name.

Return to “Issues”