Files
Testing/mailservices/mailtest.php

32 lines
1.3 KiB
PHP
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
<?php header('Content-type: text/html; charset=utf-8');
if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/mailservices/includes/');
require_once(PATHTOINCLUDES."/PHPMailer_5.2.1/class.phpmailer.php");
//Written by Philip Poremba 07/06/2015
$em="";
$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
//$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "b8world.com"; // SMTP server
$mail->SMTPAuth = true; // authentication enabled
$mail->Port = 587;
// $mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail
$mail->CharSet = $charset;
$mail->Username = "mailservices@b8world.com"; // SMTP account username
$mail->Password = "cJldETQ2V52o"; // SMTP account password
//$mail->From = "mailservices@b8world.com";
$mail->SetFrom('mailservices@b8world.com', 'Bateworld');
$mail->AddReplyTo('mailservices@b8world.com', 'Bateworld');
$mail->AddAddress('porembaphilip@gmail.com');
$mail->Subject = 'This is a test message';
$mail->MsgHTML('once upon a time and a very good time it was');
if(!$mail->Send()) {
echo 'Message could not be sent.';
echo 'Mailer Error: ' . $mail->ErrorInfo;
exit;
}
?>