Advertisement
Guest User

Halpme

a guest
Mar 14th, 2016
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. <?php
  2. if(isset($_POST['submit']))
  3. {
  4.  
  5. $message=
  6. 'Name: '.$_POST['name'].'<br / >
  7. Email: '.$_POST['email'].'<br / >
  8. Website: '.$_POST['web'].'<br / >
  9. Budget and Start: '.$_POST['price'].'<br / >
  10. Text: '.$_POST['text'].'
  11. ';
  12.  
  13. require "class.phpmailer.php";
  14.  
  15. $mail = new PHPMailer();
  16. $mail->SMTPDebug = 1;
  17. $mail->IsSMTP();
  18. $mail->Host = "smtp.gmail.com";
  19.  
  20. $mail->SMTPAuth = true;
  21. $mail->SMTPSecure = "ssl";
  22. $mail->Port = 465; //Gmail SMTP port
  23. $mail->Encoding = '7bit';
  24.  
  25. $mail->Username = "webjyezy@gmail.com";
  26. $mail->Password = "***********";
  27.  
  28.  
  29. $mail->SetFrom($_POST['email'], $_POST['name']);
  30. $mail->AddReplyTo($_POST['email'], $_POST['name']);
  31. $mail->Subject = "New Contact Form Enquiry";
  32. $mail->MsgHTML($message);
  33.  
  34. $mail->AddAddress("webjyezy@gmail.com", "Recipient Name");
  35. $result = $mail->Send();
  36. $message = $result ? 'Successfully Sent!' : 'Sending Failed!';
  37. unset($mail);
  38. }
  39. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement