NYCPHP Meetup

NYPHP.org

[nycphp-talk] can't get php to work

Peter Lehrer plehrer at gmail.com
Fri Mar 16 09:11:55 EDT 2012


Hi,
I am trying to get the php mail function to work. I have a website
running Apache2 and PHP Version 5.3.3-7+squeeze8 on Debian. I tried to
get a test email message working. Here is my code:

<?php
$to = "plehrer at gmail.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "plehrer at me.outlook.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
?>

Can anybody help me?

Regards,.
Peter Lehrer



More information about the talk mailing list