• Resolved agreda

    (@agreda)


    Hello and thanks in advance for any help. I have searched this support forum and the Yikes knowledge based but found no resolution to this issue.

    Subscribe notification emails are not being sent when users subscribe via the Yikes Mailchimp form on our website

    I have confirmed the Notification setting for the Mailchimp list, and the messages are not being spammed. They are never sent.

    When a user subscribes via the list’s Mailchimp-hosted subscribe form, the notification is sent and received immediately as expected. When subscribing via the Yikes form on the website, user is added to list, but no notification email is sent.

    Please advise.

    WordPress 4.9.2
    Easy Forms for Mailchimp 6.3.29
    Genesis theme framework

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @agreda,

    Sorry about the delay! It’s been a long week here 🙂

    To get a subscriber notification, you need to be using double opt-in. Are you using double opt-in?

    Let me know.

    Thanks,
    Kevin.

    Thread Starter agreda

    (@agreda)

    @yikesitskevin Thanks for the reply!

    No, we are not using double opt-in for this form. The site has other Yikes MC forms with single opt-in and the client assures me she gets notified immediately upon new subscribes for those forms/lists.

    Single opt-in is now the default for list forms at Mailchimp, so if that is what may be causing the issue, hopefully a plugin update might address that.

    BasLar

    (@baslar)

    I have the same issue. What to do?

    • This reply was modified 7 years ago by BasLar.
    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @agreda & @baslar,

    I will investigate this in the afternoon today.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @agreda & @baslar,

    The double opt-in requirement is still in place.

    MailChimp will send subscriber notification emails for single opt-in when you’re using their hosted forms but any API integration must use double opt-in for the notification emails to send. I cannot find this stated explicitly on MailChimp’s website but I tested the flow and read it in various other articles that use the API.

    @agreda – are you sure your client is receiving notification emails from Easy Forms single opt-in forms?

    Thread Starter agreda

    (@agreda)

    @yikesitskevin said:

    The double opt-in requirement is still in place.

    FYI: Single opt-in is now the default for all Mailchimp accounts.

    are you sure your client is receiving notification emails from Easy Forms single opt-in forms?

    She assures me this is indeed the case.

    Oliver de la Rosa

    (@oliverdelarosa)

    I’m having the same issue with a client. Is there a way for sending the notification from WordPress to a concrete e-mail? Maybe it can be a good feature to considerate in the future.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    FYI: Single opt-in is now the default for all Mailchimp accounts.

    This is true but the API hasn’t changed since September 2017 and from all of the tests I’ve ran and all of the documentation I read the subscriber notifications are not sent for single opt-in subscriptions via the API.

    @oliverdelarosa – it is possible to send a notification via WordPress by using the plugin filters.

    Here is an example:

    add_action( 'yikes-mailchimp-form-submission', 'yikes_send_email_after_submission', 10, 4 );
    
    function yikes_send_email_after_submission( $email, $merge_variables, $form_id, $notifications ) {
    
     	$content     = '<p>A user with the email ' . $email . ' has attempted to subscribe to your MailChimp list.</p>';
     	$content    .= '<p>Here is their information: </p><br>'; 
     	$content    .= print_r( $merge_variables, true );
     	$admin_email = 'email@example.com';
     	$subject     = 'New MailChimp Submission.';
     	$headers     = array( 'Content-Type: text/html; charset=UTF-8' );
    
     	wp_mail( $admin_email, $subject, $content, $headers );
     }
    Thread Starter agreda

    (@agreda)

    @yikesitskevin said:

    …the subscriber notifications are not sent for single opt-in subscriptions via the API.

    Thanks for confirming, consider this topic resolved.

    • This reply was modified 7 years ago by agreda.

    I’m having the same issue too, I need notification, but I don’t want to use double opt in. I am new to this so can you please tell me how I go about adding the code you have listed above, do I simply update the relevant php file (which one?) , via the editor in Apperance Menu or do I install a plugin?

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @chrissy59,

    First, I need to warn you that changing your website’s files can temporarily break your website so don’t take any chances and make sure you have FTP access so you can undo any mistakes.

    Second, here is an updated code snippet. Use this instead of the one above.

    add_action( 'yikes-mailchimp-form-submission', 'yikes_send_email_after_submission', 10, 4 );
    
    function yikes_send_email_after_submission( $email, $merge_variables, $form_id, $notifications ) {
    
     	$interface   = yikes_easy_mailchimp_extender_get_form_interface();
    	$form_data   = $interface->get_form( $form_id );
    	$form_name   = $form_data['form_name'];
    	$content     = '<p>MailChimp Submission for Form: ' . $form_name . '</p>';
     	$content    .= '<p>A user with the email ' . $email . ' has attempted to subscribe to your MailChimp list.</p>';
     	$content    .= '<p>Here is their information: </p><br>'; 
     	foreach ( $merge_variables as $merge_tag => $merge_value ) {
     		$content .= '<p>' . $merge_tag . ': ' . $merge_value . '</p>';
     	}
     	$admin_email = 'PUT YOUR EMAIL HERE'; // e.g. 'admin@example.com'
     	$subject     = 'New MailChimp Submission for Form: ' . $form_name;
     	$headers     = array( 'Content-Type: text/html; charset=UTF-8' );
    
     	wp_mail( $admin_email, $subject, $content, $headers );
     }

    Third, there are a few different ways to add functions to your website. The best way is to add them to your child theme’s functions.php file. If you’re not using a child theme, I would recommend using a plugin like My Custom Functions. This allows you to add the code directly from your dashboard. This plugin also has instructions on how to reconcile a mistake if one is made.

    Let me know if you have any questions.

    Cheers,
    Kevin.

    • This reply was modified 6 years, 10 months ago by yikesitskevin.

    Thanks Kevin, do you think in the near future either Mailchimp will allow notifications for single opt-in subscriptions via the API or will YIKES upgrade their plugin to include a notification automatically without having to add the code snippet above?

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    No problem!

    I have no idea what MailChimp has planned and I don’t think we would want to add functionality into the plugin for emails (because emails in general are a pain – that’s why we let MailChimp deal with them) so to answer your question probably not.

    Sorry about that.

    All the best,
    Kevin.

    Hi Kevin

    I tried adding the code (via My Custom functions) but I got the message “Sorry but your code causes a Fatel error sp its not applied. Please check the code and try again”?

    Sorry false alarm, I forgot the last }

    It worked, thank you, but it went to my junk folder, so I need to change the settings on my email client I guess?

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Subscribe Notification Emails Not Being Sent’ is closed to new replies.