Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include ("class.phpmailer.php");
- $mail = new PHPMailer();
- $mail->IsSMTP(); // set mailer to use SMTP
- $mail->Host = "mail.domain.com"; // specify main and backup server
- $mail->SMTPAuth = true; // turn on SMTP authentication
- $mail->Username = "[email protected]"; // SMTP username
- $mail->Password = "PASSWORD"; // SMTP password
- $mail->From = "[email protected]"; //do NOT fake header. The Username domain and the from domain must be the same.
- $mail->FromName = "GreenLam";
- $mail->AddAddress("[email protected]"); // Email on which you want to send mail
- $mail->AddReplyTo("[email protected]", "Support and Help"); //optional
- $mail->IsHTML(true);
- $mail->Subject = "Contact Us Form";
- $mail->Body = "This is a test form";
- $mail->SMTPDebug = 1;
- if(!$mail->Send())
- {
- echo $mail->ErrorInfo;
- }else{
- echo "Thank You for submitting your comments. Our staff will contact you shortly!";
- }
- ?>
Add Comment
Please, Sign In to add comment