I’m having trouble with my WordPress site’s contact form. I use Contact Form 7 and recently switched to WP Mail SMTP with Gmail API to fix some email delivery problems. Now the form works, but the message tags in the email body are missing.
Here’s what’s happening:
- The contact form submits fine
- Emails are sent and received
- But the message body is empty except for the actual message
I didn’t change anything in the form or the tags. They worked before switching to WP Mail SMTP. The form has fields for name, email, subject, and message. In the Mail settings, I have tags for all these fields plus some extra text.
Has anyone run into this issue? Any ideas on how to get the tags working again with this setup? I’d really like to keep using Gmail API for better deliverability, but I need those tags to show up in the emails. Thanks for any help!
I encountered a similar issue when setting up WP Mail SMTP with Gmail API. The problem often lies in how the plugin handles content-type headers. Try editing your Contact Form 7 email template and set the content type to ‘text/plain’ instead of ‘text/html’. This solved it for me.
If that doesn’t work, double-check your Gmail API configuration in WP Mail SMTP. Sometimes, incorrect settings can cause message parsing issues. Also, ensure you’re using the latest versions of all plugins involved.
As a last resort, you might consider using a different SMTP provider through WP Mail SMTP. I’ve found SendGrid to be quite reliable and it plays well with Contact Form 7 tags. Good luck troubleshooting!
hey there, i had the same prob with CF7 n WP Mail SMTP. try clearin ur cache and deactivate other email plugins if u have any. also, check if the message format in CF7 mail settings is set to HTML. if not, switch it and see if that helps. good luck!