PHP: Difference between revisions

508 bytes added ,  6 years ago
Line 119:
echo '</div>';
}
</pre>
 
*Send Email:
<pre>
$to = "aman@test.com";
$subject = "Alert Mail";
 
$headers = "From: TestAlert<testalert@test.com>" . "\r\n" .
$headers .= "Content-type: text/html; charset=\"UTF-8\"; format=flowed \r\n";
$headers .= "Mime-Version: 1.0 \r\n";
$headers .= "Content-Transfer-Encoding: quoted-printable \r\n";
$headers .= "Cc: $email" . "\r\n";
 
$txt = "<p>Hi,</p>
<p>This is a Test Alert Mail.</p>
<p>Please find below the details about this Alert:<br /><br /></p>;
 
mail($to,$subject,$txt,$headers);
</pre>