Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.86 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title></title>
  5. </head>
  6. <body>
  7. <form action="" name="form" method="post">
  8.     <input type="email" value="admin@cam-sale-group.com" name="from" placeholder="From"><br>
  9.     <input type="email" value="komy@mail.com" name="to" placeholder="To"><br>
  10.     <input type="text" value="" placeholder="Subject"><br>
  11.     <textarea name="message" value="" placeholder="message"></textarea><br>
  12.     <input type="submit" name="send" value="Send E-mail">
  13. </form>
  14. <?php
  15.     if(!empty($_POST['send'])){
  16.         $from = $_POST['from'];
  17.         $to = $_POST['to'];
  18.         $sub = $_POST['subject'];
  19.         $message = $_POST['message'];
  20.         $head  = "Content-type: text/html; charset=windows-1251 \r\n";
  21.         $head .= "From: Birthday Reminder <".$from.">\r\n";
  22.         $head .= "Bcc: ".$from."\r\n";
  23.         if(mail($to, $sub, $message, $head)){
  24.              echo "Message sent";
  25.         }
  26.     }
  27. ?>
  28. </body>
  29. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement