Standard copy of email to fixed emailaddress with emailing attendees

WordPress Event Management, Calendars & Registration Forums General Question Standard copy of email to fixed emailaddress with emailing attendees

This topic contains 16 replies, has 4 voices, and was last updated by  Stephen Harris 4 months, 1 week ago.

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #23460

    Hi Stephen,

    I wondered it was possible to have a copy of the email send from the admin console (emailing bookees) send to a fixed emailaddress.
    I tried to find some info but I can’t find it and my knowledge about scripting / programming is poor.

    We like to have a copy of te email sent to a fixed address (for us same as the emailaddress used as the admin emailadress on site but that could change in future so maybe better hardcoded in script?)

    Can you give me a suggestion or direction?

    Alex Hofstra
    #23466

    Hi Alex,

    Just to confirm you want a copy of the e-mail sent to the bookee sent to the site admin. There is an option for the site admin to be notified when a booking is made/confirmed but this contains different content from the e-mail sent the bookee.

    This snippet will ‘blind cc’ an e-mail address into all booking confirmation e-mails sent to the bookee:

    add_filter( 'eventorganiser_booking_confirmed_email_headers', function( $headers, $booking_id ) {
        $headers[] = "Bcc: email@example.com";
        return $headers;
    }, 10, 2 );
    

    You can also use eo_get_admin_email() which returns the ‘admin email’. By default this is the same as your site’s admin e-mail but could be configured seperately. It’s the same e-mail that receives the booking notification e-mails (if configured).

    Stephen Harris
    #23467

    Hi Stephen,

    I meant a copy of an email sent from the admin console sent to attendees or bookees
    (events > Bookings > (Select bookees/attendees) >Action > Sent email) were you can draft your email.
    I hope this makes it more clear.

    We sent from this functionality information to the attendees and it would be nice if a copy of this message is sent to a email address.
    I think if I have the right id filter like ‘eventorganiser_bulk_email_headers’ or something I could use your snipped
    ?

    Alex Hofstra
    #23480

    Hi Alex,

    Unfortunately there is no such hook for that e-mail. I shall add this to the backlog for consideration for the 2.1 release (development on 2.0.0 is currently in its final stages).

    Please note however, that technically, it’s not one bulk e-mail, but one e-mail per booking (as the e-mail body can contain booking-specific details: names, tickets, reference numbers etc). So you probably wouldn’t want to CC yourself into all those e-mails.

    Stephen Harris
    #23482

    Hi Stephen,

    Thanks I understand; we do not use booking – specific details but could be the case in future and then you will receive a lot of copies.
    I will try to find a solution outside the system for now.
    I think that it would be meaningful to have the option to include a manual entered email address while drafting the email would be sufficient.
    The trainer or owner of the event could then receive a copy of the information with blank booking-specific details.

    regards

    Alex Hofstra
    #27203

    I would love to have the emails sent to bookees cc’d to the site admin email.

    Can you please tell me where to insert the code you have listed above?

    Thanks
    Mark

    Mark Taylor
    #27204
    Stephen Harris
    #27508

    Stephen,
    I am having trouble getting this to work.

    Admittedly I am not good with code. I downloaded a code snippet plug in and copied the above code to it. I also tried placing the code in the functions.php but it will still not bcc the email address I entered.

    Any help would be appreciated.

    Thanks,
    Mark

    Mark Taylor
    #27510

    Sorry Stephen,
    In really reading through this stream I realize I may be looking for something else.

    When I email bookees from within an event to notify them of changes or updates to an event I would like to have that email go to the site admin or other.

    Is there an easy way to make this happen?

    Thanks,
    Mark

    Mark Taylor
    #27539

    Hi Mark,

    It’s not possible, but I shall add in a filter in the next major release.

    Stephen Harris
    #37035

    Hi Stephen,

    I am looking for the same. Did you add a filter for this?
    I would like the event author to be cc’ed in these emails.

    Thank you,
    Flo

    Florian Geier
    #37065

    Sorry Florian, I don’t think a hook was added. Can you confirm what it is you want to do?

    Stephen Harris
    #37175

    Thank you for getting back to me Stephen,

    I am trying to include the Event author in emails that are being sent out to attendees.
    Many different “trip-organizers” are creating events and are going to reach out to their attendees. I understand it isn’t easy to change the FROM address of these emails to the event organizer or author so I would like to include the author’s email address as CC in the emails so attendees know who to reply to.

    Florian Geier
    #37379

    Hi Stephen,

    please let me know if I explained correctly what I want to accomplish ad if there is a way to accomplish this?

    Thank you,
    Florian

    Florian Geier
    #37481

    Hi Florian,

    Apologies for missing your earlier message, the following code should achieve that:

    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);
            if($user_info){
                    $headers[] = "Cc:{$user_info->user_email}";
            }
            return $headers;
    }, 10, 2);
    
    Stephen Harris
Viewing 15 posts - 1 through 15 (of 17 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.