Home Forums Event Espresso Premium Send email with names of ALL "primary registrants" of a specific event to admins

Send email with names of ALL "primary registrants" of a specific event to admins

Posted: July 3, 2018 at 11:13 am


July 3, 2018 at 11:13 am

Hi Espresso-team
We sell tickets to driving courses with different instructors. Is it possible to email a list of ALL the “primary registrants” of a specific event (course) to one or more of the instructors. In order for them to compare registrations with persons attending the courses. Thank you for your help!


  • Support Staff

July 3, 2018 at 11:18 am


This can be done manually (do a CSV report, then attach to an email and email to the instructor). Currently Event Espresso 4 does not have an automated feature that can send out emails like this.


July 3, 2018 at 12:23 pm

Thanks, Yosh, for your quick reply. I already considered that, but found the information in the CSV-file too confusing for our teachers. Is there a way to filter just the registrantant names and eventually phone numbers into the CSV-output?


  • Support Staff

July 3, 2018 at 2:07 pm

Yes the CSV report is filterable via the WordPress plugin API. You can use the example code from the code library:

Since you mentioned including the phone number field, you can change the code where it has:
change to:

You can add the above code snippet to a functions plugin, then activate the plugin.


July 5, 2018 at 6:57 am

Hi Josh, thanks for your advice. As recommended I created a site specific plugin-code-snippet-libraryin, included the code you pointed to (add_filter( ‘FHEE__EE_Export__report_registrations__reg_csv_array’, ‘espresso_reg_report_filter_columns’, 10, 2)…;
), but after activating the plugin I always get an empty csv-file. Even with just the code I found on github. Any ideas?
(The export file we use is filtered in events check-in and doesn´t work either in registrations.)

By the way: we´d also need fields (columns) from the primary registrants meta (which we added as an extra questions group, e.g. Birthday (date), and also an empty column but with a header like “info” to be filled out later. (I´m more or less familiar with php and javascript/jQuery)


  • Support Staff

July 5, 2018 at 7:04 am

You can check your PHP error log which could point to an error in the code that got copied & pasted.

Since you now mention that you also need other fields, this other approach where you remove specific fields would be recommended:


July 5, 2018 at 10:59 am

Hi Josh, thanks for quickly responding. The above mentioned site plugin throws the following error warning/exception – even though all the code seems to be correct.
PHP Warning: Cannot modify header information – headers already sent by (output started at /var/www/vhosts/ in /var/www/vhosts/ on line 1216\n’

Anyway I tried the other script you mentioned and it works fine so far, Thanks for your help!


  • Support Staff

July 5, 2018 at 11:08 am

The code within the site plugin does not cause the Headers already sent warning, however if there are any spaces, new lines, or other stuff before an opening <?php tag or after a closing ?> tag. You’ll find some troubleshooting steps here:


July 6, 2018 at 4:24 am

HI Josh – there´s a new issue concerning the CSV-Output: We n o w would like to include also the event times (e.g. 7:00 h – 17:00 h) and a custom field that we created with each event named instructors (containing the names of the courses instructors (instruktoren)). Both don´t exist in the original “filtered” CSV-output-file. How would you suggest to gon on (I have seen the following script – but I am not shure, either which variables to use nor how to order or use in connection with the other function $fields_to_exclude_from_csv = array(){}). Thank you very much for your support!


  • Support Staff

July 6, 2018 at 6:51 am

You can add the following to inside the function you already have:

$event_id = $reg_row[ 'Registration.EVT_ID' ];
// example of getting the post meta
$instruktoren = get_post_meta( $event_id, 'instruktoren', true );
if ( $instruktoren != '' ) {
    $reg_csv_array[ 'Instruktoren' ] = $instruktoren;

Then to add start and end time columns:


July 6, 2018 at 8:01 am

Thanks, Josh, the above script worked after a little correction of the line: $intruktoren = get_post_meta( $event_id, ‘instruktoren’, true ); I had set up the custom meta field with a big starting “I” so the function worked with:
$intruktoren = get_post_meta( $event_id, ‘Instruktoren’, true );

The support post ‘Send email with names of ALL "primary registrants" of a specific event to admins’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Markahn 8 months, 2 weeks ago ago

Topic Tags


This topic is:
Do NOT follow this link or you will be banned from the site!