Hi
Now have I got stucked as I’m trying to get mail sent out to multiple addresses and using this code:
add_action( 'tablepress_event_saved_table', 'pabrady_tablepress_save_notification', 10, 1 );
function pabrady_tablepress_save_notification( $table_id ) {
$frontend_controller = TablePress::load_controller( 'frontend' );
$frontend_controller->init_shortcodes();
add_filter( 'tablepress_edit_link_below_table', '__return_false' );
$table_html = do_shortcode( "[table id={$table_id} print_name=true /]" );
$mail_text = "The table with the ID {$table_id} was saved: {$table_html}.";
$headers = array('Content-Type: text/html; charset=UTF-8');
$multiple_recipients = array(
'[email protected]',
'[email protected]',
'[email protected]'
);
wp_mail(
$multiple_recipients,
'Tablepress have been saved',
$mail_text,
$headers
);
}
Can you see if something in above is incorrect placed as I dont get any mail and I dont get any error either.