Hello Folks. I want to first appreciate for all the help that i have received here. I am pretty new to PHP and im trying to use PHP mailer for my SMYP settings. With the settings below, i tried to send the mail, but after a long time of loading, it just stops with a blank page. I set up and error report, that would let me know whether the message was sent or not, but i got no error message, just blank screen. I think its the STMP settings. Im supposed to put my ISP's Username and Password here.
I originally put my Gmail username and password up there.
This is the Full Code
Please i need help with the SMTP settings or whatever the issue with the code is. Thanks
Code:
$mail->IsSMTP();
$mail->Host = "mail.example.com";
$mail->Port = 25;
$mail->SMTPAuth = false;
$mail->Username = "yourname@example.com";
$mail->Password = "yourpassword";
This is the Full Code
Code:
<?php
require_once("../zoomie_files/includes/PHPmailer/PHPMailerAutoload.php");
$to_name = "Test Mail";
$to = "timothyazubuikeh@gmail.com";
$subject = "Mail Test at ".strftime("%T", time());//Provides the time
$message ="This is a Test. Ignore the inbox";
$message = wordwrap($message, 70);
$from_name = "Timothy Azubuikeh";
$from = "admin@zoomie.com";
//PHP SMTP version default
$mail = new PHPMailer;
$mail->IsSMTP();
$mail->Host = "gmail.com";
$mail->Port = 25;
$mail->SMTPAuth = false;
$mail->Username = "my_personal_email@gmail.com";
$mail->Password = "my_password";
$mail->FromName = $from_name;
$mail->From = $from;
$mail->AddAddress($to, $to_name);
$mail->Subject = $subject;
$mail->Body = $message;
if (!$mail->send())
{
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo "Message sent!";
}
?>
Comment