{"id":284520,"date":"2026-02-25T06:10:47","date_gmt":"2026-02-25T06:10:47","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/integration-for-mailpoet-and-cf7\/"},"modified":"2026-07-03T03:40:36","modified_gmt":"2026-07-03T03:40:36","slug":"integration-for-mailpoet-and-cf7","status":"publish","type":"plugin","link":"https:\/\/ja.wordpress.org\/plugins\/integration-for-mailpoet-and-cf7\/","author":12003720,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.2","stable_tag":"1.0.2","tested":"7.0.2","requires":"5.8","requires_php":"7.4","requires_plugins":null,"header_name":"Integration for MailPoet and CF7","header_author":"Md Monirul Alom","header_description":"Connect Contact Form 7 with MailPoet. Map form fields, capture newsletter consent, and add subscribers to selected lists from your CF7 forms.","assets_banners_color":"5a9bc7","last_updated":"2026-07-03 03:40:36","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/monirulalom.com\/","header_plugin_uri":"https:\/\/monirulalom.com","header_author_uri":"https:\/\/monirulalom.com\/","rating":5,"author_block_rating":0,"active_installs":70,"downloads":679,"num_ratings":2,"support_threads":1,"support_threads_resolved":1,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"monirulalom","date":"2026-02-25 06:10:15"},"1.0.1":{"tag":"1.0.1","author":"monirulalom","date":"2026-06-01 06:50:02"},"1.0.2":{"tag":"1.0.2","author":"monirulalom","date":"2026-07-03 03:40:36"}},"upgrade_notice":{"1.0.1":"<p>Tested up to: 7.0<\/p>","1.0.0":"<p>Initial stable release.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":2},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3469079,"resolution":"128x128","location":"assets","locale":"","width":128,"height":128},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3469079,"resolution":"256x256","location":"assets","locale":"","width":256,"height":256},"icon.svg":{"filename":"icon.svg","revision":3469079,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3469079,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3469079,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3621174,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"preferredVersions\":{\"php\":\"8.3\",\"wp\":\"latest\"},\"features\":{\"networking\":true},\"steps\":[{\"step\":\"login\",\"username\":\"admin\",\"password\":\"password\"},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"contact-form-7\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"mailpoet\"},\"options\":{\"activate\":true}},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"integration-for-mailpoet-and-cf7\"},\"options\":{\"activate\":true}},{\"step\":\"runPHP\",\"code\":\"<?php\\nrequire_once '\\\/wordpress\\\/wp-load.php';\\nglobal $wpdb;\\n\\n\\\/\\\/ Update Site Title\\nupdate_option('blogname', 'Integration for MailPoet and CF7 Preview');\\n\\nif (!defined('WPMU_PLUGIN_DIR')) {\\n    define('WPMU_PLUGIN_DIR', WP_CONTENT_DIR . '\\\/mu-plugins');\\n}\\nif (!file_exists(WPMU_PLUGIN_DIR)) {\\n    wp_mkdir_p(WPMU_PLUGIN_DIR);\\n}\\n\\n\\\/\\\/ Write MU plugin to intercept mail & force active subscribers\\n$mu_code = '<?php\\nadd_filter(\\\"pre_wp_mail\\\", \\\"__return_true\\\", 9999);\\nadd_filter(\\\"mailpoet_signup_confirmation_enabled\\\", \\\"__return_false\\\", 9999);\\n\\nadd_action(\\\"mailpoet_subscriber_created\\\", function($subscriber) {\\n    global $wpdb;\\n    if (!empty($subscriber[\\\"id\\\"])) {\\n        $wpdb->update(\\n            $wpdb->prefix . \\\"mailpoet_subscribers\\\",\\n            array(\\\"status\\\" => \\\"subscribed\\\"),\\n            array(\\\"id\\\" => $subscriber[\\\"id\\\"])\\n        );\\n    }\\n}, 10, 1);\\n';\\n\\nfile_put_contents(WPMU_PLUGIN_DIR . '\\\/suppress-mail-errors.php', $mu_code);\\n\\n\\\/\\\/ Insert\\\/Update MailPoet Settings directly into database\\n$mailpoet_settings_table = $wpdb->prefix . 'mailpoet_settings';\\n$now = current_time('mysql');\\n\\n$settings_data = array(\\n    'welcome_wizard_current_step'            => '',\\n    'show_congratulate_after_first_newsletter' => '1',\\n    'public_id'                              => '419a228d018ea78c83541222fa635ba9',\\n    'new_public_id'                          => 'false',\\n    'signup_confirmation'                    => 'a:1:{s:22:\\\"transactional_email_id\\\";i:1;}',\\n    'analytics'                              => 'a:1:{s:7:\\\"enabled\\\";s:0:\\\"\\\";}',\\n    '3rd_party_libs'                         => 'a:1:{s:7:\\\"enabled\\\";s:0:\\\"\\\";}',\\n    'version'                                => '5.34.2',\\n    'installed_after_new_domain_restrictions' => '1'\\n);\\n\\nforeach ($settings_data as $name => $value) {\\n    $wpdb->replace(\\n        $mailpoet_settings_table,\\n        array(\\n            'name'       => $name,\\n            'value'      => $value,\\n            'created_at' => $now,\\n            'updated_at' => $now\\n        ),\\n        array('%s', '%s', '%s', '%s')\\n    );\\n}\\n\\n\\\/\\\/ Completely bypass MailPoet setup wizard via PHP API as safety net\\nif (class_exists('\\\\MailPoet\\\\Settings\\\\SettingsController')) {\\n    try {\\n        $settings = \\\\MailPoet\\\\Settings\\\\SettingsController::getInstance();\\n        $settings->set('sender', array(\\n            'name' => 'Admin',\\n            'address' => get_option('admin_email', 'admin@example.com')\\n        ));\\n        $settings->set('mta_group', 'website');\\n        $settings->set('mta', array('method' => 'PHPMail'));\\n        $settings->set('signup_confirmation.enabled', false);\\n        $settings->set('analytics.enabled', false);\\n        $settings->set('show_intro', false);\\n    } catch (Exception $e) {}\\n}\\n\\n\\\/\\\/ Fetch Privacy Policy Page URL\\n$privacy_page_url = get_privacy_policy_url();\\nif (empty($privacy_page_url)) {\\n    $privacy_page_id = get_option('wp_page_for_privacy_policy');\\n    if ($privacy_page_id) {\\n        $privacy_page_url = get_permalink($privacy_page_id);\\n    } else {\\n        $privacy_page_url = home_url('\\\/privacy-policy\\\/');\\n    }\\n}\\n\\n\\\/\\\/ Create CF7 Form\\nif (class_exists('WPCF7_ContactForm')) {\\n    $form_title = 'Contact Form with MailPoet Consent';\\n    $form_body = \\\"<label> Your Name\\\\n    [text* your-name] <\\\/label>\\\\n\\\\n<label> Your Email\\\\n    [email* your-email] <\\\/label>\\\\n\\\\n<label> Subject\\\\n    [text* your-subject] <\\\/label>\\\\n\\\\n<label> Your Message (optional)\\\\n    [textarea your-message] <\\\/label>\\\\n\\\\n[mailpoet_signup_consent mailpoet_signup_consent] Subscribe to newsletter, by signing up you agree to the <a href=\\\\\\\"\\\" . esc_url($privacy_page_url) . \\\"\\\\\\\" target=\\\\\\\"_blank\\\\\\\" rel=\\\\\\\"noopener noreferrer\\\\\\\">Privacy Policy<\\\/a> [\\\/mailpoet_signup_consent]\\\\n\\\\n[submit \\\\\\\"Submit\\\\\\\"]\\\";\\n\\n    $contact_form = WPCF7_ContactForm::get_template(array('title' => $form_title));\\n    $properties = $contact_form->get_properties();\\n    $properties['form'] = $form_body;\\n    $contact_form->set_properties($properties);\\n    $form_id = $contact_form->save();\\n\\n    \\\/\\\/ Fetch MailPoet List ID\\n    $list_id = 1;\\n    if (class_exists('\\\\MailPoet\\\\API\\\\API')) {\\n        try {\\n            $mailpoet_api = \\\\MailPoet\\\\API\\\\API::MP('v1');\\n            $lists = $mailpoet_api->getLists();\\n            if (!empty($lists)) {\\n                $list_id = (int)$lists[0]['id'];\\n            }\\n        } catch (Exception $e) {}\\n    }\\n\\n    \\\/\\\/ Config integration table\\n    $table_name = $wpdb->prefix . 'integration_for_mailpoet_and_cf7_form_configs';\\n    $mapping_data = array(\\n        'email'      => 'your-email',\\n        'first_name' => 'your-name'\\n    );\\n\\n    $wpdb->replace(\\n        $table_name,\\n        array(\\n            'form_id'       => $form_id,\\n            'field_mapping' => wp_json_encode($mapping_data),\\n            'list_ids'      => wp_json_encode(array((string)$list_id)),\\n            'created_at'    => $now,\\n            'updated_at'    => $now\\n        ),\\n        array('%d', '%s', '%s', '%s', '%s')\\n    );\\n\\n    \\\/\\\/ Generate correct Integration Settings URL with action nonce and form ID\\n    $nonce = wp_create_nonce('integration_for_mailpoet_and_cf7_settings_nonce');\\n    $integration_config_url = admin_url('admin.php?page=integration-for-mailpoet-and-cf7-settings&cf7_form_id=' . $form_id . '&_wpnonce=' . $nonce);\\n\\n    \\\/\\\/ Admin links\\n    $cf7_edit_url = admin_url('admin.php?page=wpcf7&post=' . $form_id . '&action=edit');\\n    $mailpoet_subscribers_url = admin_url('admin.php?page=mailpoet-subscribers');\\n\\n    \\\/\\\/ Instructions banner\\n    $instructions_html = '<!-- wp:html -->\\n<div style=\\\"background: #f0f7ff; border: 1px solid #0073aa; border-left-width: 4px; padding: 16px; margin-bottom: 24px; border-radius: 4px;\\\">\\n    <h3 style=\\\"margin-top: 0; color: #0073aa;\\\">\\ud83d\\ude80 How to Test This Live Preview<\\\/h3>\\n    <ol style=\\\"margin-bottom: 12px; padding-left: 20px;\\\">\\n        <li>Fill out and submit the form below with a test email address and check the consent box.<\\\/li>\\n        <li>Check <a href=\\\"' . esc_url($mailpoet_subscribers_url) . '\\\" target=\\\"_blank\\\">MailPoet Subscribers<\\\/a> to verify the email was automatically added to your list.<\\\/li>\\n    <\\\/ol>\\n    <p style=\\\"margin-bottom: 0;\\\">\\n        <strong>Quick Admin Links:<\\\/strong>\\n        <a href=\\\"' . esc_url($cf7_edit_url) . '\\\" target=\\\"_blank\\\" style=\\\"margin-left: 8px; text-decoration: underline;\\\">Edit CF7 Form<\\\/a> |\\n        <a href=\\\"' . esc_url($integration_config_url) . '\\\" target=\\\"_blank\\\" style=\\\"margin-left: 4px; text-decoration: underline;\\\">Integration Settings<\\\/a>\\n    <\\\/p>\\n<\\\/div>\\n<!-- \\\/wp:html -->';\\n\\n    \\\/\\\/ Create Contact Us page\\n    wp_insert_post(array(\\n        'post_title'   => 'Contact Us',\\n        'post_content' => $instructions_html . '<!-- wp:shortcode -->[contact-form-7 id=\\\"' . $form_id . '\\\" title=\\\"' . $form_title . '\\\"]<!-- \\\/wp:shortcode -->',\\n        'post_status'  => 'publish',\\n        'post_type'    => 'page'\\n    ));\\n}\\n\"}],\"landingPage\":\"\\\/contact-us\"}"}},"all_blocks":[],"tagged_versions":["1.0.0","1.0.1","1.0.2"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3469079,"resolution":"1","location":"assets","locale":"","width":2702,"height":1356},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3469079,"resolution":"2","location":"assets","locale":"","width":1544,"height":1536},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3469079,"resolution":"3","location":"assets","locale":"","width":2704,"height":1420},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3469079,"resolution":"4","location":"assets","locale":"","width":2704,"height":1604},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3469079,"resolution":"5","location":"assets","locale":"","width":2696,"height":1224},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3469079,"resolution":"6","location":"assets","locale":"","width":1350,"height":1214},"screenshot-7.png":{"filename":"screenshot-7.png","revision":3469079,"resolution":"7","location":"assets","locale":"","width":2694,"height":1448}},"screenshots":[]},"plugin_section":[],"plugin_tags":[1152,256560,1033,455,1016],"plugin_category":[41,42],"plugin_contributors":[95816],"plugin_business_model":[],"class_list":["post-284520","plugin","type-plugin","status-publish","hentry","plugin_tags-contact-form-7","plugin_tags-field-mapping","plugin_tags-mailpoet","plugin_tags-newsletter","plugin_tags-subscribers","plugin_category-communication","plugin_category-contact-forms","plugin_contributors-monirulalom","plugin_committers-monirulalom"],"banners":{"banner":"https:\/\/ps.w.org\/integration-for-mailpoet-and-cf7\/assets\/banner-772x250.png?rev=3469079","banner_2x":"https:\/\/ps.w.org\/integration-for-mailpoet-and-cf7\/assets\/banner-1544x500.png?rev=3469079","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/integration-for-mailpoet-and-cf7\/assets\/icon.svg?rev=3469079","icon":"https:\/\/ps.w.org\/integration-for-mailpoet-and-cf7\/assets\/icon.svg?rev=3469079","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/integration-for-mailpoet-and-cf7\/assets\/screenshot-1.png?rev=3469079","caption":""},{"src":"https:\/\/ps.w.org\/integration-for-mailpoet-and-cf7\/assets\/screenshot-2.png?rev=3469079","caption":""},{"src":"https:\/\/ps.w.org\/integration-for-mailpoet-and-cf7\/assets\/screenshot-3.png?rev=3469079","caption":""},{"src":"https:\/\/ps.w.org\/integration-for-mailpoet-and-cf7\/assets\/screenshot-4.png?rev=3469079","caption":""},{"src":"https:\/\/ps.w.org\/integration-for-mailpoet-and-cf7\/assets\/screenshot-5.png?rev=3469079","caption":""},{"src":"https:\/\/ps.w.org\/integration-for-mailpoet-and-cf7\/assets\/screenshot-6.png?rev=3469079","caption":""},{"src":"https:\/\/ps.w.org\/integration-for-mailpoet-and-cf7\/assets\/screenshot-7.png?rev=3469079","caption":""}],"raw_content":"<!--section=description-->\n<p>Integration for MailPoet and CF7 connects Contact Form 7 and MailPoet in a practical, admin-friendly workflow.<\/p>\n\n<p>After enabling the plugin, you get a <strong>CF7 Integration<\/strong> submenu under MailPoet where you can:<\/p>\n\n<ul>\n<li>Select a Contact Form 7 form from a form list<\/li>\n<li>Map CF7 fields to MailPoet subscriber fields<\/li>\n<li>Choose one or more MailPoet lists per form<\/li>\n<li>Review sync errors from the integration screen<\/li>\n<\/ul>\n\n<p>The plugin includes a dedicated CF7 form-tag generator for <code>mailpoet_signup_consent<\/code>, including privacy-policy link support.<\/p>\n\n<p>Key behavior:<\/p>\n\n<ul>\n<li>Subscribers are added only when <code>mailpoet_signup_consent<\/code> is checked<\/li>\n<li>MailPoet Email must be mapped to a CF7 email-type field<\/li>\n<li>A form must contain exactly one <code>mailpoet_signup_consent<\/code> tag for configuration<\/li>\n<li>Error logs are stored in a dedicated custom database table<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin folder to <code>\/wp-content\/plugins\/<\/code> or install it from your deployment workflow.<\/li>\n<li>Activate <strong>Integration for MailPoet and CF7<\/strong> from WordPress Plugins.<\/li>\n<li>Make sure both <strong>Contact Form 7<\/strong> and <strong>MailPoet<\/strong> are installed and active.<\/li>\n<li>Go to <strong>MailPoet -&gt; CF7 Integration<\/strong>.<\/li>\n<li>Choose a form from the list and click <strong>Configure<\/strong>.<\/li>\n<li>Map MailPoet fields (especially <strong>Email<\/strong>) to CF7 fields, select lists, and save.<\/li>\n<li>In your CF7 form, include exactly one <code>mailpoet_signup_consent<\/code> tag.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"where%20is%20the%20settings%20page%3F\"><h3>Where is the settings page?<\/h3><\/dt>\n<dd><p>Go to <strong>MailPoet -&gt; CF7 Integration<\/strong> in wp-admin.<\/p><\/dd>\n<dt id=\"why%20is%20the%20configure%20button%20disabled%20for%20a%20form%3F\"><h3>Why is the Configure button disabled for a form?<\/h3><\/dt>\n<dd><p>That form either has no <code>mailpoet_signup_consent<\/code> tag or has more than one.\nKeep exactly one <code>mailpoet_signup_consent<\/code> tag in the form template.<\/p><\/dd>\n<dt id=\"why%20are%20subscribers%20not%20being%20added%20after%20form%20submission%3F\"><h3>Why are subscribers not being added after form submission?<\/h3><\/dt>\n<dd><p>Common causes:<\/p>\n\n<ul>\n<li><code>mailpoet_signup_consent<\/code> was not checked<\/li>\n<li>MailPoet Email is not mapped<\/li>\n<li>Email is mapped to a non-email CF7 field<\/li>\n<li>No valid list selection or mapping for the form<\/li>\n<\/ul>\n\n<p>Check the sync logs in the same integration screen for details.<\/p><\/dd>\n<dt id=\"is%20newsletter%20signup%20optional%20or%20required%3F\"><h3>Is newsletter signup optional or required?<\/h3><\/dt>\n<dd><p>By default, <code>mailpoet_signup_consent<\/code> is optional.\nIf you use <code>mailpoet_signup_consent*<\/code>, it becomes required by CF7 validation.<\/p><\/dd>\n<dt id=\"can%20i%20use%20more%20than%20one%20mailpoet%20signup%20consent%20tag%20in%20one%20form%3F\"><h3>Can I use more than one mailpoet signup consent tag in one form?<\/h3><\/dt>\n<dd><p>No. A form must contain only one <code>mailpoet_signup_consent<\/code> tag.<\/p><\/dd>\n<dt id=\"where%20are%20sync%20logs%20stored%3F\"><h3>Where are sync logs stored?<\/h3><\/dt>\n<dd><p>In a custom database table:\n    {wp_prefix}integration_for_mailpoet_and_cf7_sync_logs<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.2<\/h4>\n\n<p>Added required field option<\/p>\n\n<h4>1.0.1<\/h4>\n\n<p>Tested up to: 7.0<\/p>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial stable release<\/li>\n<li>MailPoet submenu with per-form CF7 mapping UI<\/li>\n<li>MailPoet list selection per form<\/li>\n<li>Consent tag generator with privacy policy link support<\/li>\n<li>Consent-gated subscriber sync<\/li>\n<li>Email mapping validation to CF7 email fields<\/li>\n<li>Dedicated custom table for error logs<\/li>\n<\/ul>","raw_excerpt":"Map Contact Form 7 submissions to MailPoet subscribers with per-form field mapping, consent control, list selection, and error logging.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/284520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=284520"}],"author":[{"embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/monirulalom"}],"wp:attachment":[{"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=284520"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=284520"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=284520"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=284520"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=284520"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ja.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=284520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}