Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php # Script must return TRUE (if allright) or FALSE (if e-mail not valid)
- if (!filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
- echo 0;
- exit;
- }
- define('TO', 'romannovohackii@gmail.com'); // Your e-mail adress
- define('FROM', "From: My website <hello@{$_SERVER['HTTP_HOST']}>\r\n");
- define('SUBJECT', 'New subscribe'); // Subject of mail
- $message = $_POST['email'];
- $r = mail(TO, SUBJECT, $message, FROM);
- echo ($r) ? 1 : 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement