Preview: testmail.php
Size: 1.19 KB
/home/jambtst2015/public_html/giraffeng.com/admin/mail/testmail.php
<?php
require 'class.phpmailer.php';
$mail = new PHPMailer;
$mail->IsSMTP(); // Set mailer to use SMTP
$mail->Host = 'smtp.gmail.com.'; // Specify main and backup server
//$mail->Host = 'mail.taxiandcab.co.uk';
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'dipanjan.brahma@gmail.com'; // SMTP username
$mail->Password = '9038557237'; // SMTP password
//$mail->Username = 'support@taxiandcab.co.uk';
//$mail->Password = 'teymen123';
//$mail->port = '25';
$mail->SMTPSecure = 'tls'; // Enable encryption, 'ssl' also accepted
$mail->From = 'dipanjan.brahma@gmail.com';
$mail->FromName = 'Mailer';
$mail->AddAddress('sayantan@infosolz.com', 'Josh Adams'); // Add a recipient
$mail->Subject = 'Here is the subject';
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
$mail->AltBody = 'This is the body in plain text for non-HTML mail clients';
if(!$mail->Send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
exit;
}
else{
echo 'Message sent successfully.';
print_r($mail);
}
?>
Directory Contents
Dirs: 5 × Files: 10