SHARE
TWEET

Untitled

a guest Nov 6th, 2018 163 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $name ="New Signup"; //$_POST['Name'];
  3. $email = $_POST['email'];
  4. $subject = "New Sign Up Email Alert!";//$_POST['Subject'];
  5. $message = "Please Save This Email";//$_POST['Message'];
  6.  
  7. $to = 'fariche25@yahoo.com';
  8. $subject = 'the subject';
  9. $message = 'FROM: '.$name.'  Email: '.$email.'  Subject: '.$subject.'  Message: '.$message;
  10. $headers = 'From: fariche25@yahoo.com' . "\r\n";
  11.  
  12. if (filter_var($email, FILTER_VALIDATE_EMAIL)) { // this line checks that we have a valid email address
  13. //$success = mail($to, $subject, $message, $headers, "-f fariche25@yahoo.com");
  14. //if (!$success) {
  15. //    $errorMessage = error_get_last()['message'];
  16. //}else{
  17. mail($to, $subject, $message, $headers, "-f fariche25@yahoo.com"); //This method sends the mail.
  18. echo $to, $subject, $message, $headers;
  19. echo "Your email was sent!"; // success message
  20. }
  21. else{
  22. echo "Error! Make Sure You Have Entered A Valid Email Address.";
  23. }
  24. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top