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 5 years, 7 months ago.
-
AuthorPosts
-
July 15, 2016 at 9:07 am #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
July 18, 2016 at 12:34 pm #23466Hi 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
July 18, 2016 at 12:53 pm #23467Hi 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
July 19, 2016 at 9:25 am #23480Hi 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
July 19, 2016 at 9:47 am #23482Hi 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
April 29, 2017 at 5:45 am #27203I 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
MarkMark Taylor
April 29, 2017 at 3:03 pm #27204Hi Mark,
Please see: https://wp-event-organiser.com/blog/tutorial/where-should-i-put-code-from-the-tutorials/
Stephen Harris
May 26, 2017 at 12:24 am #27508Stephen,
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,
MarkMark Taylor
May 26, 2017 at 3:51 am #27510Sorry 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,
MarkMark Taylor
May 29, 2017 at 9:32 pm #27539Hi Mark,
It’s not possible, but I shall add in a filter in the next major release.
Stephen Harris
January 2, 2020 at 8:01 pm #37035Hi 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,
Floaccwebmaster
January 8, 2020 at 12:03 am #37065Sorry Florian, I don’t think a hook was added. Can you confirm what it is you want to do?
Stephen Harris
January 17, 2020 at 12:38 am #37175Thank 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.accwebmaster
February 16, 2020 at 12:46 am #37379Hi 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,
Florianaccwebmaster
February 29, 2020 at 10:38 pm #37481Hi 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
-
AuthorPosts