Please suggest me a few codes to make this system a bit more secure.
<div id="email-data"> <div id="content"> some php generated content </div> </div> <a id="sendEmail"> SEND EMAIL</a>
PHP MAIL CODE :
<?php $to = "email@example.com"; $subject = "FROM WEBSITE"; $message = $_POST['content']; $headers = "From: company <firstname.lastname@example.org>" . "\r\n" . "Content-type: text/html" . "\r\n"; mail($to, $subject, $message, $headers); ?>
- The topic ‘Security suggestion for custom email system made on JS and PHP’ is closed to new replies.