Support » Plugin: Constant Contact Forms » How to send admin email notification to multiple email address?

  • Resolved Abhishek Kumbhani

    (@abhishekkumbhani)


    Hello there,

    Is there any way to send admin email notifications to multiple email address? Currently It is sending on my default WordPress admin email address but I want to send notification to one more email address.

    Ex. Whenever someone fill up and subscribe the form, email notification should sent on ’email1@website.com’ and ’email2@website.com’

    Is it possible to do that?

    Thank you,
    Abhishek

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Constant Contact

    (@constantcontact)

    Are you familiar with how to use WordPress filters at all?

    We have this filter available and the admin_email option is what we default to.

    $email = get_option( 'admin_email' );
    
    /**
     * Filters the email to send Constant Contact Forms admin emails to.
     *
     * @since 1.3.0
     *
     * @param string $email Email address to send to. Default admin_email option.
     */
    return apply_filters( 'constant_contact_destination_email', $email );
    

    You should be able to return an array of emails that they should go to. I am providing an example below.

    We are also looking into a way to handle this via UI instead of code.

    function abhishek_email_addresses( $emails ) {
    	return array(
    		'email@email.com',
    		'email2@email.com',
    	);
    }
    add_filter( 'constant_contact_destination_email', 'abhishek_email_addresses' );
    
    Thread Starter Abhishek Kumbhani

    (@abhishekkumbhani)

    Thanks for your reply. But seems like its not working. Still getting email on my default email only.

    Plugin Author Constant Contact

    (@constantcontact)

    Good day @abhishek,

    It does look like you’re actually correct and that we need to make some adjustments in the code to handle this scenario. It’s not so much a bug, but more a use-case we missed taking some details into account for. We’ll need to get changes for this committed to the codebase and released, and we can’t presently say exactly when that will happen. It won’t be started on until early next week at the earliest as well. It has been filed in our internal issue tracking though, so it should get done as a whole.

    The example code above will be a way to handle this in the future, so we’re not wrong in that sense at the moment, but we’re not yet completely right either.

    I wish we had a better answer at the moment, and our apologies for potentially misleading a bit.

    Plugin Author Constant Contact

    (@constantcontact)

    The better handling for multiple email addresses as well as per-form emailing are features slated for the next major release.

    Marking as resolved

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to send admin email notification to multiple email address?’ is closed to new replies.