email send error
Posted: Wed Apr 12, 2006 6:58 pm
I am getting an error with this email script I got from a PHP book, that I wanted to try out. I am not sure where the error is coming from.
the error is
Parse error: syntax error, unexpected T_VARIABLE in email_send.php on line 6
Code: Select all
<?php
//who is the email going to?
$to="emailaddress@gmail.com";
//what is the message?
$message = "This is my first email message sent from PHP.\r\n"
."This is a second line of text \r\n";
//who else do we want to send the message to?
$more_headers = "Cc:emailaddress@mindspring.com\r\n";
//send the email
$result=mail(
$to,
"my first email sent from PHP",
$message
$more_headers
);
?>Parse error: syntax error, unexpected T_VARIABLE in email_send.php on line 6