P
P
Pavel Novikov2018-03-12 16:26:29
WordPress
Pavel Novikov, 2018-03-12 16:26:29

How to integrate SendGrid into WordPress?

Hello, I'm trying to set up a SendGrid integration for my WordPress site. I have a contact form made with Contact Form 7, a SendGrid API with full access, and a template ID that I prepared in SendGrid for email. And in principle, everything works well, except for one important point - in the template, placeholders are not replaced with data from the symphony form and the email comes out with placeholders instead of data, for example

Name: %firstname% %lastname%
E-mail: %clientemail%
Phone: %mobilephone%
Project description: %projectdescription%

How can I send form data to SendGrid from WordPress?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Novikov, 2018-03-12
@paulfcdd

The answer turned out to be tritely simple, but it was not documented anywhere (at least I did not find it in the documentation)
In the settings of the form that is sent to SendGrid, you need to add an additional header:
where clientname is the placeholder of your template, [your-name] is the field from the form, the data from which you need to substitute into the email template. Naturally, you need to substitute your parameters :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question