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!
<html>
<body>
<?php
$to = "woo@hoo.com"; // Change this to your e-mail address ;)
$subject = "PHP mail message";
$message = "This mail was sent using PHP mail funtion.";
$headers = 'From: Woo Hoo <woo@hoo.com>' . "\r\n";
$headers .= 'Date: ' . date ( 'r' ) . "\r\n";
if (mail ($to, $subject, $message, $headers)) {
echo "Success.<br />\n";
}
else {
echo "Failure.<br />\n";
}
?>
</body>
</html>
I have tried various date function styles as well as changing the whole $headers line. Every time I just get the current time as date or 1.1.1970 for date.
That's the core code of my mailer page, it has all kinds of logins and list functions because it's a newsletter sender. I don't think pasting more code here would help...
I tried to set the timezone to Europe/Helsinki, it didn't help:
date_default_timezone_set('Europe/Helsinki');