PHP Mail Error

software development


HI … I’m new at PHP, and did some research to find this script. However, when I try to run it, I get the following error:
syntax error, unexpected T_STRING in /home/.patch/myusername/mydomain/my.php on line 2.

Here’s the script:

<?php $to = ""; $subject = "Reminder Message - SC3Arts Production Arts Team Service This Weekend!"; $body = "REMINDER: You are scheduled to serve on the Production Arts team this weekend! If you are unavailable to serve, please contact a replacement or send an email to\nTo check this week's schedule, login here: If you are unable to login, please contact Toni Lynn Sarna at with your desired password, so that she can set you up with access.\n\nThanks for your service, and God bless!"; mail($to, $subject, $body) ?>


Add a semicolon to the end of the mail() line.

My website


Nope … same error.


You are lacking a space between mail and (

My website


i actually don’t see anything wrong with the script as you posted it – php allows you to skip the semicolon on the last line as ?> implies a semicolon.

which is line 2? are you sure you posted exactly the contents of my.php? i pasted it into phpeclipse and it didn’t see anything wrong with what you posted either.

track7 - my dream-hosted site