In order to run this example in the editor, you will need a Sendgrid account to supply your own Sendgrid API key . Paste the key in the appropriate line in the sendEmail.jsw file.
The live demo of this example has an additional field for the your Sendgrid API Key. To run the live demo , paste your API Key into the Sendgrid API Key input field before clicking the Send Email button.
As in the original example, we start by setting up a simple form with all of the fields necessary to send an email. When the user completes the form, the user clicks the Send button to request that the email be sent. The fields are checked for validity, and if everything is OK, the backend sendMail() function calls the SendGrid NodeJS send() function to send the email. A Lightbox then opens to notify the user of the email’s transmission status (success or failure).
Wow! That opens up a whole new world. I somehow missed the introduction of the PM. Was looking at the Google Calendar API, bu this is great. Good work.
PS the Gear Icon (in PM Doc) should be + sign.
@yisrael-wix Got the code implemented but it is not hitting sendgrid using this api. Here is the editor link for the site. Please can you have a look snd let me know where I am going wrong?
Did you try the example? The example is tested and works fine.
I see you modified the sendEmail() function in sendEmail.jsw. I would recommend first using the exact code in the example since it is tested code. You can then start applying your changes step by step testing as you go.
@yisrael-wix all I am trying to do is get the user input of their name and email address in a form and send an email with a sendgrid template with a download button. Dont even want to personalise the email template at this point. Pulling what is left of my hair out.
i’ll rework my form so it matches the syntax of the example and see if can get it to call the sendgrid api. Also, where can I see the console.log to see the fail points - so I can get more visibliity and try and fix it myself (and learn at the same time!)?