How to Send Contact Form 7 Submissions to Mailgun
Mailgun is primarily a transactional email API, but it also supports mailing lists for marketing campaigns.
If you are running Contact Form 7 and want to push submissions into Mailgun, you could pay for a cloud automation tool. Or you could do it directly from WordPress for free.
Why not just use Zapier?
For a single form-to-email delivery connection on WordPress, a cloud automation service is more cost and complexity than you need. AFI runs on your server with no task meter.
What you will need
- A WordPress site with Contact Form 7 installed and at least one form.
- A Mailgun account.
- The Advanced Form Integration plugin (free from WordPress.org).
Connect Mailgun to AFI
- Log in to your Mailgun account.
- Go to Settings → API Keys and copy your Private API Key.
- In WordPress, go to AFI → Settings → Mailgun.
- Enter your domain and API Key, then click Save.
Setting up the integration
1. Create a new integration
Go to AFI → Add New. Name it something like CF7 to Mailgun.
2. Pick your trigger
Select Contact Form 7 and choose the form. AFI detects fields automatically.
3. Select Mailgun as the destination
Choose Mailgun from the dropdown and pick Add Mailing List Member. This adds a member to a Mailgun mailing list.
4. Map fields
Match each Mailgun field to the corresponding Contact Form 7 field. Smart tags like {{_submission_date}} and {{utm_source}} are also available.
5. Add conditions if needed
Set up conditional rules to send only specific submissions based on form field values.
6. Save and test
Click Save Integration. Submit a test form and verify the data arrived in Mailgun. Check AFI → Log to debug any issues.
Free vs Pro
The free version maps email and name to Mailgun with unlimited submissions. Pro adds custom field mapping. No per-submission fees on any plan.
Frequently asked questions
Do I need coding skills?
No. Everything is configured through a visual interface.
Will adding this slow down my form?
No. AFI processes data asynchronously after the form is submitted.
Can I connect multiple forms?
Yes. Create as many integrations as you need, from different forms to different platforms.
Get started
Install Advanced Form Integration free from WordPress.org and connect Contact Form 7 to Mailgun in minutes.
Leave a Reply