Sending mail not working correctly
You should concatenate the messages together and then send the email outside of the loop once you’ve built up the entire message string you want to send. Try something like this: if ( $all_reservations_on_day_query->have_posts() ) : //the loop $message_mail = “”; while ( $all_reservations_on_day_query->have_posts() ) : $all_reservations_on_day_query->the_post(); //Get all values for sending mail to owner … Read more