Files
Testing/testreport.php
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

61 lines
2.4 KiB
PHP

<?php
include("header.php");
try{
// DECODE SUBJECT AND EMAIL FOR SENDING
//$subject = htmlspecialchars_decode($subject, ENT_QUOTES);
//$message = htmlspecialchars_decode($message, ENT_QUOTES);
// REPLACE VARIABLES IN SUBJECT AND MESSAGE
//$subject = str_replace($search, $replace, $subject);
////$message = str_replace($search, $replace, $message);
// ENCODE SUBJECT FOR UTF8
//$subject="=?UTF-8?B?".base64_encode($subject)."?=";
// REPLACE CARRIAGE RETURNS WITH BREAKS
//$message = str_replace("\n", "<br>", $message);
require_once('/home/bateworld/public_html/mailer/class.phpmailer.php');
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded
//$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch
//$mail->IsSMTP(); // telling the class to use SMTP
$mail = new PHPMailer();
//$mail->IsSMTP(); // telling the class to use SMTP
//$mail->Host = "mail.b8world.com"; // SMTP server
//$mail->SMTPAuth = true; // authentication enabled
//$mail->SMTPSecure = 'ssl';
//$mail->Port = 587;
//$mail->SMTPSecure = 'ssl'; // secure transfer enabled REQUIRED for GMail
//$mail->Username = "happybirthday@b8world.com"; // SMTP account username
//$mail->Password = "y2sWJ*#h8)xG"; // SMTP account password
//$mail->From = "mailservices@b8world.com";
$mail->SetFrom('happybirthday@b8world.com', 'Bateworld');
$mail->AddReplyTo('happybirthday@b8world.com', 'Bateworld');
$mail->AddAddress('leprakhauns@gmail.com');
$mail->Subject = 'Test of bateworld birthday eamil';
//$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
$mail->MsgHTML('Hello, this is the test email');
$mail->AddAttachment('images/61916url_logo.png'); // attachment
//$mail->AddAttachment('mailer/images/phpmailer_mini.gif'); // attachment
$mail->Send();
echo "Message Sent OK<p></p>\n";
//echo "Message Sent OK<p></p>\n";
} catch (phpmailerException $e) {echo "no";
//mail("porembaphilip@gmail.com", "MAIL ERROR", $e->errorMessage());
echo $e->errorMessage(); //Pretty error messages from PHPMailer
} catch (Exception $e) {echo "no1";
echo $e->getMessage(); //Boring error messages from anything else!
//mail("porembaphilip@gmail.com", "MAIL ERROR", $e->getMessage());
}
echo "check";
//mail("porembaphilip@gmail.com", "MAIL ERROR", "testing message");
?>