Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $name=$_POST['Your_Name'];
- $email=$_POST['Your_Email'];
- $message=$_POST['Your_Add'];
- echo $name ;
- // When we unzipped PHPMailer, it unzipped to
- // public_html/PHPMailer_5.2.0
- require("mailer/PHPMailerAutoload.php");
- require("mailer/class.smtp.php");
- require("mailer/class.phpmailer.php");
- $mail = new PHPMailer();
- // set mailer to use SMTP
- $mail->IsSMTP();
- // we are setting the HOST to localhost
- $mail->Host = "mail.soumitrapendse.com"; // specify main and backup server
- $mail->SMTPAuth = true; // turn on SMTP authentication
- $mail->Username = "*****@gmail.com"; // SMTP username
- $mail->Password = "******"; // SMTP password
- $mail->From = $email;
- // below we want to set the email address we will be sending our email to.
- $mail->AddAddress("***@gmail.com", "AAA");
- // set word wrap to 50 characters
- $mail->WordWrap = 50;
- // set email format to HTML
- $mail->IsHTML(true);
- $mail->Subject = "You have received feedback from your website!";
- // $message is the user's message they typed in
- // on our contact us page. We set this variable at
- // the top of this page with:
- // $message = $_REQUEST['message'] ;
- $mail->Body = $message;
- $mail->AltBody ="Name : {$name}nnEmail : {$email}nnMessage : {$message}";
- if(!$mail->Send())
- {
- echo "Message could not be sent. <p>";
- echo "Mailer Error: " . $mail->ErrorInfo;
- exit;
- }
- else
- {
- echo "Thank you for contacting us. We will be in touch with you very soon.";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement