Функция почты требует:
mail($to, $subject, $message, $headers)
Добавить заголовок к четвертому параметру в функции
"Content-Type: text/html; charset=UTF-8"
Это должно выглядеть так:
$headers = "Content-Type: text/html; charset=UTF-8\r\n".
"From: {$data['the_name']} <{$data['the_email']}>";
$subject = 'Availability question for alleywayhouse-hydra';
$data['emailSent'] = mail('info@alleywayhouse-hydra.gr', $subject, $data['emailbody'], $headers);
Также, Вашу функцию можно изменить следующим образом:
function handle_form_postdata($post_array)
{
$data = [];
$keys = ['the_name', 'the_email', 'arrive', 'depart', 'guests', 'room_select', 'children'];
foreach ($keys as $key) {
$data[$key] = isset($post_array[$key]) ? trim($post_array[$key]) : '';
}
$data['the_message'] = isset($post_array['the_message']) ? filter_var($post_array['the_message'], FILTER_SANITIZE_STRING) : '';
$data['errorString'] = '';
$data['emailbody'] = '';
$data['emailSent'] = false;
$headers = "Content-Type: text/html; charset=UTF-8\r\n" .
"From: {$data['the_name']} <{$data['the_email']}>";
$subject = 'Availability question for alleywayhouse-hydra';
$data['emailSent'] = mail('info@alleywayhouse-hydra.gr', $subject, $data['emailbody'], $headers);
return $data;
}