Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // validation complete
- if(isset($_POST['submit'])){
- if($msg_firstname=="" && $formaterror=="" && $msg_lastname=="" && $formaterrorl=="" && $emailerror=="" && $emailformat=="" && $msg_phone=="" && $phoneformat=="" && $msg_company=="" && $msg_pages=="" && $msg_extra=="")
- $msg_success = "Form successfully sent!";
- //send mail
- $mail = new PHPMailer(true);
- try {
- $mail->isSMTP();
- $mail->Host = 'smtp.gmail.com';
- $mail->SMTPAuth = true;
- $mail->Username = '';
- $mail->Password = '';
- $mail->SMTPSecure = 'tls';
- $mail->Port = 587;
- $mail->setFrom('noreply@freud-online.com', 'Freud Online | Bookings');
- $mail->addAddress('', '');
- $mail->isHTML(true);
- $mail->Subject = 'Here is the subject';
- $mail->Body = 'This is the HTML message body <b>in bold!</b>';
- $mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
- $mail->send();
- echo 'Message has been sent';
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement