Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ERROR);
- include_once('class.phpmailer.php');
- $mail = new PHPMailer();
- $mail->IsSMTP();
- $mail->SMTPDebug = 1; // 1 tells it to display SMTP errors and messages, 0 turns off all errors and messages, 2 prints messages only.
- $mail->SMTPAuth = true;
- //$mail->SMTPSecure = "ssl";
- $mail->Host = "smtpout.secureserver.net";
- $mail->Port = 80;
- $mail->Username = "fromemailhere";
- $mail->Password = "passwordhere";
- $mail->From = "fromemailhere";
- $mail->FromName = "Mike Henken";
- $mail->AddAddress("mikehenken@gmail.com", "Mike Henken");
- $mail->Subject = "Your Login Information";
- $mail->Body = "Put body of message HERE.";
- if ($mail->Send() == true) {
- echo "The message has been sent";
- }
- else {
- echo "
- The email message has NOT been sent for some reason. Please try again later.
- ";
- echo "Mailer error: " . $mail->ErrorInfo;
- }
- ?>
Add Comment
Please, Sign In to add comment