Jump to content

[SOLVED] Simple Email Script Error


tlsarna

Recommended Posts

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 = "[email protected]";
$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 [email protected].\nTo check this week's schedule, login here: http://www.sc3arts.com/pages/pa/thiswk.shtml. If you are unable to login, please contact Toni Lynn Sarna at [email protected] 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);
?>

 

I've tried putting a slash before the @ sign (a suggestion from another board), as well as tried with and without the semicolon at the end of the mail () line.  Nothing seems to work. 

Link to comment
https://forums.phpfreaks.com/topic/47228-solved-simple-email-script-error/
Share on other sites

Yes, this is the entire script.  I also tried the single quotes around the email address, with no luck.  In fact, I have another error that popped up too ...

 

unexpected character in input '\' (ASCII 92) state=1 in <b>/home/.patch/username/mydomain.com/myphp.php</b> on line <b>2</b><br \>

 

I built and saved this in Wordpad - could this be the problem?  Is there a special text editor I should be using to build the PHP scripts?  I also tried in Frontpage, and that caused all SORTS of problems .....

 

Thanks!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.