Sending Mail from Contact Form 7 with Rest API: Step-by-Step Guide
Send mail from Contact Form using Rest API. There are few steps need to follow, So lets go
First need to know your contact form 7 form ID. So at first collect the form ID from your WordPress Dashboard Or You can follow my screenshots step by step
First add contact form 7 plugins and go to contacts option from your WordPress left side option bar.
After click the contact forms option you can see the form list, you just need the specific form ID (i mean which form you want to check for sending mail)
Now open the postman app and hit this URL
https://your-domain.com/wp-json/contact-form-7/v1/contact-forms/(form_id)/feedback
your-domain.com will be your domain address like link.sopu.live and fill up the form_id with your contact form 7 form ID. Now add URL in postman with your real data. Like my domain is link.sopu.live and my form ID is 5663092, so the API is
URL: https://link.sopu.live/wp-json/contact-form-7/v1/contact-forms/5663092/feedback
Add this URL in the post man. And fill the field data, but remember one important thing, your body will be form data for sending mail to the user.
And fill up your form field, which is the key and value in postman. After finishing the fill up the data, please hit the Send URL, if all field is ok then it will show you send message like this.
For Validation message
Read More: 4 Step to Create a WordPress Child Theme, WordPress walker_nav_menu: Basic Usage of walker_nav_menu, 5 Steps to Enhance WordPress Search with Autocomplete and AJAX, How to Create WordPress Plugin from Scratch – Step-by-Step Guide