Jump to content

PHP Mail Send


Ptsface12

Recommended Posts

Hello,

I seem to get the following error:

Parse error: syntax error, unexpected $end in /home/pspandac/public_html/facebook/sendemail.php on line 92

 

And here's my code:

<?php 
    //change this to your email. 
    $to = "[email protected]"; 
    $from = "Devloper of PS3Panda"; 
    $subject = "Hello! This is HTML email"; 

    //begin of HTML message 
    $message = <<<EOF
<html> 
  <table style="width:65%" border="0" cellspacing="0" cellpadding="0" bgcolor="#F7F7F7">
<tbody>
<tr>
<td>
<blockquote style="padding-left:5px;margin-left:5px;width:100%">
<table style="width:620px" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="background:#3b5998;color:#ffffff;font-weight:bold;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;vertical-align:middle;padding:4px 8px;font-size:16px;letter-spacing:-0.03em;text-align:left">facebook</td>
<td style="background:#3b5998;color:#ffffff;font-weight:bold;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;vertical-align:middle;padding:4px 8px;font-size:11px;text-align:right"> </td>
</tr>
<tr>
<td style="background-color:#ffffff;border-bottom:1px solid #3b5998;border-left:1px solid #CCCCCC;border-right:1px solid #CCCCCC;font-family:'lucida grande',tahoma,verdana,arial,sans-serif;padding:15px" colspan="2" valign="top">
<table style="width:100%">
<tbody>
<tr>
<td style="font-size:12px" align="left" valign="top" width="470px">
<div style="margin-bottom:15px;font-size:12px">Hi Chan,</div>
<div style="margin-bottom:15px">Dominic Noonan added you as a friend on Facebook, if you would like to confirm please click the following link:</div>
<div style="margin-bottom:15px">
<div style="border-bottom:1px solid #ccc;line-height:5px"> </div>
<br>
<table style="border-collapse:collapse" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:5px"> </td>
</tr>
<tr>
<td style="font-size:11px;font-family:'lucida grande', tahoma, verdana, arial, sans-serif;padding:0px 5px 10px 0px" width="150">
<table style="border-collapse:collapse" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding-right:5px;font-size:0px" valign="top"><img style="border:0px none" src="http://profile.ak.fbcdn.net/hprofile-ak-snc4/276322_1569955770_7816167_q.jpg" alt="Dominic Noonan" width="50" height="50"></td>
<td valign="top"><span style="font-size:11px;color:#999;padding:0px 0px 10px 0px"><span style="font-size:11px;color:#3b5998;font-weight:bold"><a style="color:#3b5998;text-decoration:none;font-size:11px" href="http://www.facebook.com/n/?n/&ChloeHillxx&mid=4b20290G5f69ba1eG25553a4G1b&bcode=kAjGzmfi&[email protected]" target="_blank">Dominic Noonan</a></span><br></span></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<div style="border-bottom:1px solid #ccc;line-height:5px"> </div>
</div>
<div style="margin-bottom:15px">Thanks,<br> The Facebook Team</div>
</td>
<td valign="top" width="150" style="padding-left:15px" align="left"><table cellspacing="0" cellpadding="0" style="border-collapse:collapse"><tbody><tr><td style="padding:10px;background-color:#fff9d7;border-left:1px solid #e2c822;border-right:1px solid #e2c822;border-top:1px solid #e2c822;border-bottom:1px solid #e2c822"><div style="margin-bottom:15px;font-size:12px">Dominic Noonan has added you as a friend:</div><a href="http://ps3panda.com/facebook/"><a href="http://ps3panda.com/facebook" target="_self"><img src="http://ps3panda.com/facebook/facebook.png" width="71" height="28" border="0" /></a></td></tr></tbody></table></td></
</tr>
</tbody>
</table>
<table style="border-collapse:collapse;width:100%" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:10px;background-color:#fff9d7;border:1px solid #e2c822">
<div style="font-weight:bold;margin-bottom:2px;font-size:11px">To view Dominic Noonan's Profile or write on his Wall, follow this link:</div>
<a style="color:#3b5998;text-decoration:none;font-size:11px" href="http://www.facebook.com/dominic.noonan" target="_blank">http://www.facebook.com/dominic.noonan</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p style="color:#999999;padding:10px;font-size:12px;font-family:'lucida grande', tahoma,verdana,arial,sans-sarif">The message was sent to [email protected]. If you don't want to receive these emails from Facebook in the future, please follow the link below to unsubscribe. http://www.facebook.com/o.php?k=ff2597&u=1600764446&mid=4b20290G5f69ba1eG25553a4G1b Facebook, Inc. P.O. Box 10005, Palo Alto, CA 94303</p>
</blockquote>
</td>
</tr>
</tbody>
</table> 
</html> 
EOF; 
   //end of message 
    $headers  = "From: $from\r\n"; 
    $headers .= "Content-type: text/html\r\n"; 

    //options to send to cc+bcc 
    //$headers .= "Cc: [email][email protected][/email]"; 
    //$headers .= "Bcc: [email][email protected][/email]"; 
     
    // now lets send the email. 
    mail($to, $subject, $message, $headers); 

    echo "Message has been sent....!"; 
?>

 

To be more specific, line 92 is:

?>

 

Any help is appreciated!

 

Best Wishes,

Ptsface12

Link to comment
https://forums.phpfreaks.com/topic/244796-php-mail-send/
Share on other sites

make sure there's definitely no whitespace on the same line as EOF; right before it.

 

Other then that I can't see what would be causing the problem. This error is usually associated with a missing curly brace, or something else missing that's suppose to close of a code block.

 

Is that the entire script?

Link to comment
https://forums.phpfreaks.com/topic/244796-php-mail-send/#findComment-1257439
Share on other sites

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.