Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['submit']))
- {
- $message=
- 'Name: '.$_POST['name'].'<br / >
- Email: '.$_POST['email'].'<br / >
- Website: '.$_POST['web'].'<br / >
- Budget and Start: '.$_POST['price'].'<br / >
- Text: '.$_POST['text'].'
- ';
- require "class.phpmailer.php";
- $mail = new PHPMailer();
- $mail->SMTPDebug = 1;
- $mail->IsSMTP();
- $mail->Host = "smtp.gmail.com";
- $mail->SMTPAuth = true;
- $mail->SMTPSecure = "ssl";
- $mail->Port = 465; //Gmail SMTP port
- $mail->Encoding = '7bit';
- $mail->Username = "webjyezy@gmail.com";
- $mail->Password = "***********";
- $mail->SetFrom($_POST['email'], $_POST['name']);
- $mail->AddReplyTo($_POST['email'], $_POST['name']);
- $mail->Subject = "New Contact Form Enquiry";
- $mail->MsgHTML($message);
- $mail->AddAddress("webjyezy@gmail.com", "Recipient Name");
- $result = $mail->Send();
- $message = $result ? 'Successfully Sent!' : 'Sending Failed!';
- unset($mail);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement