mail() - no errors

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

mail() - no errors

Post by Ree »

I am trying to send email using this:

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';
}
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. ;)
Post Reply