Advertisement
FlyFar

mail.php

Jul 18th, 2023
638
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.29 KB | Cybersecurity | 0 0
  1. <?php
  2.  
  3. $to = $_POST['to'];
  4.  
  5. $subject = $_POST['subject'];
  6.  
  7. $message = $_POST['message'];
  8.  
  9. $from = $_POST['from'];
  10.  
  11. $headers = "From:" . $from;
  12.  
  13. $mail = mail($to,$subject,$message,$headers,$from);
  14.  
  15. if($mail)
  16.     {
  17.     echo "Email sent to: ".$to;
  18.     echo "</br>";
  19.     echo "From: ".$from;
  20.     }
Tags: mail
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement