• Resolved natewolf7

    (@natewolf7)


    I need to receive an email as soon as the form is filled out so that I can reach out to the potential customer with more info. Is there a way in settings for me to receive an email notification right after the form is filled out? I know that I can do something in mailchimp, but there emails are not immediate and can sometimes take over a day.

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

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

    (@yikesitskevin)

    Hi @natewolf7,

    Managing email is a pain so we don’t officially support emails with the plugin. However, you’re not the first person to ask this and we do have a code snippet that you can add to your site that will send emails after users have subscribed.

    This is the code snippet. Replace [email protected] with your email. Are you familiar with adding custom PHP code to your site? Let me know.

     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 . ': ' . ( is_array( $merge_value ) ? implode( ', ', $merge_value ) : $merge_value ) . '</p>';
     	}
     	$admin_email = '[email protected]';
     	$subject     = 'New MailChimp Submission for Form: ' . $form_name;
     	$headers     = array( 'Content-Type: text/html; charset=UTF-8' );
    
     	wp_mail( $admin_email, $subject, $content, $headers );
     }

    Again, we don’t officially support email and we can’t troubleshoot email problems.

    Cheers,
    Kevin.

    Thread Starter natewolf7

    (@natewolf7)

    Hey Kevin thanks so much for the support! I am sure I could figure it out with some research, but wondering if you might already have some guidance or instructions that I could follow. Thank you again so much, this plugin is awesome!

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hey @natewolf7,

    You should add custom PHP code to your child theme’s functions.php file. If you’re not using a child theme, then you can either add the code to your theme’s functions.php file or by using a plugin like My Custom Functions.

    If you’re not familiar with editing your theme’s files, then I would suggest you use the plugin. It has some security measures in place so you don’t make a mistake copying the code.

    Cheers,
    Kevin.

    Thread Starter natewolf7

    (@natewolf7)

    That works thanks so much Kevin this is a huge help to my new business 🙂

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Receieve email notifications’ is closed to new replies.