Page 1 of 2
Unable to send custom Form results via Email using SendGrid API
Posted: Tue Oct 13, 2015 12:41 am
by Ed
I created a custom Form from scratch; applied the SendGrid services to the form; and mapped the fields.
However, when I click submit the I never receive the email. I know that I setup the SendGrid API correctly because the standard form (called "mail") that comes with the plugin works fine.
Do I have to add some kind of Javascript anywhere within the mapping (e.g. the "To Email" field) in order for the form to work?
Thank you in advance!
Unable to send custom Form results via Email using SendGrid API
Posted: Tue Oct 13, 2015 5:20 pm
by Illya Stepanov
Hi Ed -
What mapping structure do you use for your form? Could you please show it with screenshots?
Unable to send custom Form results via Email using SendGrid API
Posted: Tue Oct 13, 2015 5:30 pm
by Ed
Hi lllya,
Please see mapping image.
Unable to send custom Form results via Email using SendGrid API
Posted: Tue Oct 13, 2015 5:32 pm
by Ed
I also wanted to add that the form data is also stored onto a local database collection.
Unable to send custom Form results via Email using SendGrid API
Posted: Tue Oct 13, 2015 8:07 pm
by Ed
Does the above mapping image help?
Perhaps, is Javascript required in the mapping section under "To Email" field?
Unable to send custom Form results via Email using SendGrid API
Posted: Tue Oct 13, 2015 9:18 pm
by Illya Stepanov
What do you passing into a 'To' field?
Unable to send custom Form results via Email using SendGrid API
Posted: Tue Oct 13, 2015 9:20 pm
by Ed
Unable to send custom Form results via Email using SendGrid API
Posted: Wed Oct 14, 2015 10:58 am
by Serhii Kulibaba
Hello,
Could you show us full request and response data from the browser network tab?
Unable to send custom Form results via Email using SendGrid API
Posted: Wed Oct 14, 2015 6:43 pm
by Ed
After running network tab, I received the following error on line 1135 (see attached image):
// Send email with attachment
uploadBinaryHelper(sendgrid_email, Apperyio.storage.image_base64.get());
Error Message: 'sendgrid_email' is undefined
// Send email without attachment
//sendgrid_email.execute({});
Unable to send custom Form results via Email using SendGrid API
Posted: Thu Oct 15, 2015 4:18 am
by Ed
Luckily, was able to resolve the issue. It turns out I needed to invoke the service for the submit Button on the form.
On the topic of sending emails, I would also like to include on the custom Form a "Pull-Down Menu" with different "To" email addresses to select from. Basically, every time the form is completed, I would like to have the option to send the form results to anyone from the list of emails in the pull-down menu.
Therefore, can you please provide the Javascript to be used in the Mapping for the Pull-Down Menu field? Thank you in advance.