mail() - no errors
Posted: Mon Nov 21, 2005 3:58 am
I am trying to send email using this:
In php.ini I only set the correct smtp server of my ISP (SMTP=mail.server.com). I also tried SMTP=smtp.server.com. However, I recieve no emails after sending. Also I do not get any errors either. I am running Windows machine. What could be the problem?
EDIT: Seems to work, I was just a bit impatient not recieving it so long.
Code: Select all
$to = 'email@email.com';
$subject = 'Testing emailing';
$message = '<html>
<head>
</head>
<body style="bgcolor: #DDDDDD;">
<H4>BOOH</H4>
</body>
</html>';
$headers = 'From: Email Tester' . "\r\n";
$headers .= 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$check = mail($to, $subject, $message, $headers);
if (!$check)
{
echo 'Problemo';
} else
{
echo 'OK';
}EDIT: Seems to work, I was just a bit impatient not recieving it so long.