Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Unable to send custom Form results via Email using SendGrid API

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!

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

Unable to send custom Form results via Email using SendGrid API

Hi Ed -

What mapping structure do you use for your form? Could you please show it with screenshots?

Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Unable to send custom Form results via Email using SendGrid API

Hi lllya,

Please see mapping image.

Image

Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Unable to send custom Form results via Email using SendGrid API

I also wanted to add that the form data is also stored onto a local database collection.

Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Unable to send custom Form results via Email using SendGrid API

Does the above mapping image help?

Perhaps, is Javascript required in the mapping section under "To Email" field?

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

Unable to send custom Form results via Email using SendGrid API

What do you passing into a 'To' field?

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Unable to send custom Form results via Email using SendGrid API

Hello,

Could you show us full request and response data from the browser network tab?

Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Unable to send custom Form results via Email using SendGrid API

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({});

Image

Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Unable to send custom Form results via Email using SendGrid API

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.

Return to “Issues”