• Resolved psn

    (@psn)


    Hi

    I have created a small plugin to get a notification whenever Tablepress table has been updated but I dont get any mail when I try to implement multiple mail addresses.

    My code is:

    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 = "Tabell med ID {$table_id} har uppdaterats: {$table_html}.";
      $headers = array('Content-Type: text/html; charset=UTF-8');
    
      $multiple_recipients = array('test1@home.se','test2@home.se','test3@home.se'); 
    
      foreach($multiple_recipients as $to)
      wp_mail($to,'Tablepress tabell har uppdaterats',$mail_text,$headers);
    }

    I dont get any error whats so ever but I only get 1 of 3 mail sent to above mail addresses and its no 2 of the 3 I get so I dont understand why the other 2 is not sent or recieved. I have an email log and there I can see all 3 as sent.
    No mail is arrived as spam either.

    Any idea whats wrong or how the solution should look like?

    Per

Viewing 1 replies (of 1 total)
  • Thread Starter psn

    (@psn)

    Found issues which was linked to an other plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘Don't all mail’ is closed to new replies.