Advertisement
Guest User

Untitled

a guest
Feb 14th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. <?php
  2. // validation complete
  3. if(isset($_POST['submit'])){
  4. if($msg_firstname=="" && $formaterror=="" && $msg_lastname=="" && $formaterrorl=="" && $emailerror=="" && $emailformat=="" && $msg_phone=="" && $phoneformat=="" && $msg_company=="" && $msg_pages=="" && $msg_extra=="")
  5. $msg_success = "Form successfully sent!";
  6. //send mail
  7. $mail = new PHPMailer(true);
  8. try {
  9. $mail->isSMTP();
  10. $mail->Host = 'smtp.gmail.com';
  11. $mail->SMTPAuth = true;
  12. $mail->Username = '';
  13. $mail->Password = '';
  14. $mail->SMTPSecure = 'tls';
  15. $mail->Port = 587;
  16. $mail->setFrom('noreply@freud-online.com', 'Freud Online | Bookings');
  17. $mail->addAddress('', '');
  18.  
  19. $mail->isHTML(true);
  20. $mail->Subject = 'Here is the subject';
  21. $mail->Body = 'This is the HTML message body <b>in bold!</b>';
  22. $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
  23.  
  24. $mail->send();
  25. echo 'Message has been sent';
  26. }
  27. }
  28. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement