Mailpoet - Contact Form 7 Integration
[resolved] subscription works, but no confirmation email is sent (8 posts)

  1. hanhaoran
    Posted 1 year ago #

    hi, the plugin seems to work fine as it registers the subscriber along with the correct data, but it doesn't send the confirmation email to the subscriber - even though this setting is activated in my mailpoet settings.

    any idea what could be the problem?

    thank you for a quick reply :)


  2. Mihail D
    Posted 1 year ago #

    i already added in helpers/user.php additional row for this:

    change 1155
    if ( (int) $user_data['details']['status'] <= 1) {

    added from row 1167:
    $config = WYSIJA::get('config', 'model');
    $mailer = WYSIJA::get('mailer', 'helper');
    // Load subscription notification mail, and if it doesn't exists create a new one
    $mEmail = WYSIJA::get('email', 'model');
    $mEmail->getFormat = OBJECT;
    $emailConfirmationData = $mEmail->getOne(false, array('email_id' => $config->getValue('subscribe_confirmed_email_id')));
    if (empty($emailConfirmationData)) {

    $mbody = '...your mail text...';

    // somehow the notification email has been lost so we need to create a new one
    $dataEmailCon = array('from_name' => $config->getValue('from_name'), 'from_email' => $config->getValue('from_email'),
    'replyto_name' => $config->getValue('replyto_name'), 'replyto_email' => $config->getValue('replyto_email'),
    'subject' => 'Your subscription was approved', 'body' => $mbody /* $config->getValue('subscribe_confirmed_email_body') */ , 'type' => '0', 'status' => '99');

    $confemailid = $mEmail->insert($dataEmailCon);
    if ($confemailid)
    $config->save(array('subscribe_confirmed_email_id' => $confemailid));


    // Send mail
    $mEmail = WYSIJA::get('email', 'model');
    $mEmail->getFormat = OBJECT;
    $emailConfirmationData = $mEmail->getOne(false, array('email_id' => $config->getValue('subscribe_confirmed_email_id')));

    // Replace [blog_unsubscribe_link]
    $blog_unsubscribe_link = "http://" . strtolower($_SERVER['SERVER_NAME']) . '/unsubscribe/?wysija-page=1&controller=confirm&wysija-key=' . $user_data['details']['keyuser'] . '&action=unsubscribe&page=unsubscribe';
    $emailConfirmationData->body = str_replace("[blog_unsubscribe_link]", $blog_unsubscribe_link, $emailConfirmationData->body);

    $resultsend = $mailer->sendOne($emailConfirmationData, $user_data['details']['user_id'], true);

  3. hanhaoran
    Posted 1 year ago #

    how do i use this?

    my subscription confirmation is in 3 languages and quite complex to realize this way. is there any way to trigger the standard mailpoet confirmation message to be sent ?

  4. Mihail D
    Posted 1 year ago #

    then you need to make changes in
    $mbody = '...your mail text...';

    It's my own solution - i'm not from MailPoet team.
    I have many suggestions for team ... but implements their myself

  5. hanhaoran
    Posted 1 year ago #

    wow - that's amazing - thank you so much for sharing this. I will wait for a reply here from the plugin developer. i hope they can fix this as i believe i am not the only one with the issue. if they don't i will come back to your solution for sure!
    thank you!

    anything here from the developers? i just tried another solution i found online (removing the -xxx numer sequence added when generating the cf7 mailpoet field, but that didnt help either and it looks now like the whole plugin is not functioning all together!

  6. Tung Wysija
    Posted 1 year ago #

    Hello guys,

    Could you please try with the latest version (1.0.3)?


  7. hanhaoran
    Posted 1 year ago #

    works like a charm! thanks! :)

  8. MailPoet
    Plugin Author

    Posted 1 year ago #

    Thank you, we are glad to hear that!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Mailpoet - Contact Form 7 Integration
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.