I want to send php mail with template below is my code
<?php
// sending email
$SendFrom = "MyWebsite <no-reply@mywebsite.com>";
$SendTo = "$user_email";
$SubjectLine = "Welcome Email Activation";
// Build Message Body from Web Form Input
$MsgBody='Hello, <br/> <br/> Your are most welcome to Mywebsite.com<br/> <br/> Before you continue kindly activate your email by clicking on the below link or copy and paste it in your browser and hit enter for your email activation to take place.<br/> <br/> <a href="'.$base_url.'activation/index.php?code='.$activation.'">'.$base_url.'activation/index.php?code='.$activation.'</a>';
$MsgBody = htmlspecialchars($MsgBody); //make content safe
// Send E-Mail and Direct Browser to Confirmation Page
mail($SendTo, $SubjectLine, $MsgBody, "From: " . $SendFrom);
?>
Notice that i using a simple php code and not PDO as it is working for me Thanks, any help will be appreciated.
`'s for line breaks, those won't work without an HTML headers declaration. If you want to use your existing code without sending as HTML, use `\n` and not `
`. – Funk Forty Niner Oct 02 '15 at 14:00