Organizers' addresses as senders or reply headers

WordPress Event Management, Calendars & Registration Forums General Question Organizers' addresses as senders or reply headers

This topic contains 1 reply, has 2 voices, and was last updated by  Stephen Harris 7 months, 3 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #39881

    Hi Stephen,

    Is there any function that could use the organizers’ email address as the sender instead of the main admin email? or maybe something that will include the organizers’ emails as the reply header?

    This way, when the registrant replies to the confirmation email, the message will reach the organizers/appropriate departments instead of the website administrator.

    Thank you.

    Harrison Ortega

    Hi Harrison,

    There is a filter for the email headers (including reply-to and from headers): eventorganiser_booking_confirmed_email_headers.

    (There is also the eventorganiser_bulk_email_headers for if you bulk email attendees from the bookings admin page).

    Not fully tested, but this should achieve what you’re after:

    add_filter('eventorganiser_booking_confirmed_email_headers', function($headers, $booking_id) {
        $event_id = eo_get_booking_meta( $booking_id, 'event_id' );
        $organiser_id  = (int) get_post_field( 'post_author', $event_id );
        $user_info = get_userdata($organiser_id);
            $from_email = $user_info->display_name;
            $from_name = $user_info->user_email;
            $headers = array(
                'from:' . stripslashes_deep( html_entity_decode( $from_name, ENT_COMPAT, 'UTF-8' ) ) . " <$from_email>",
                'reply-to:' . $from_email
        return $headers;
    }, 10, 2);
    Stephen Harris
Viewing 2 posts - 1 through 2 (of 2 total)
To enable me to focus on Pro customers, only users who have a valid license for the Pro add-on may post new topics or replies in this forum. If you have a valid license, please log-in or register an account using the e-mail address you purchased the license with. If you don't you can purchase one here. Or there's always the WordPress repository forum.