Answer the question
In order to leave comments, you need to log in
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%
Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question