I am using this basic php code to send out a html email.
When i use [email protected]
as a to address the script works.
However, when i try to use [email protected]
the script says:
Parse error: syntax error, unexpected '@' in /home/u925912002/public_html/send_email.php on line 3
My code:
<?php
$to = ‘[email protected]’;
$subject = 'I need to show html';
$from ='[email protected]';
$body = '<p style=color:red;>This text should be red</p>';
ini_set("sendmail_from", $from);
$headers = "From: " . $from . "
Reply-To: " . $from . "";
$headers .= "Content-type: text/html
";
if (mail($to, $subject, $body, $headers)) {
echo("<p>Sent</p>");
} else {
echo("<p>Error...</p>");
}
?>
please can someone show me what i'm doing wrong. thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…