i'm developing a Web Application in php and at some point i need to send a confirmation mail. Sendmail in installed but when i try to run this code it load the page really slow and nothing happens.
<?php
$to = "my.real.mail@gmail.com";
$subject = "Confimation";
$message = "
<html>
<head>
<title>HTML email</title>
</head>
<body>
<p>This email contains HTML Tags!</p>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>John</td>
<td>Doe</td>
</tr>
</table>
</body>
</html>
";
// Always set content-type when sending HTML email
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
// More headers
$headers .= 'From: <my.real.mail@gmail.com>' . "\r\n";
mail($to,$subject,$message,$headers);
?>
This is the mail.log
May 19 13:18:02 al-Inspiron-5548 sendmail[6934]: t4JBI24R006934: from=www-data, size=416, class=0, nrcpts=0, msgid=<201505191118.t4JBI24R006934@localhost.localdomain>, relay=www-data@localhost
May 19 13:18:02 al-Inspiron-5548 sendmail[6936]: t4JBI2ex006936: from=www-data, size=416, class=0, nrcpts=0, msgid=<201505191118.t4JBI2ex006936@localhost.localdomain>, relay=www-data@localhost
Someone can help me?