Files
Testing/testemail.php

45 lines
1.6 KiB
PHP
Raw Permalink Normal View History

2026-11-17 16:15:01 -05:00
<?php
exit;
/* $Id: help_contact.php 42 2009-01-29 04:55:14Z john $ */
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'include/phpmailer/src/Exception.php';
require 'include/phpmailer/src/PHPMailer.php';
require 'include/phpmailer/src/SMTP.php';
$mail = new PHPMailer;
$mail->isSMTP();
$mail->SMTPDebug = 2; // 0 = off (for production use) - 1 = client messages - 2 = client and server messages
$mail->Host = "mail.b8world.com"; // use $mail->Host = gethostbyname('smtp.gmail.com'); // if your network does not support SMTP over IPv6
$mail->Port = 587; // TLS only
$mail->SMTPKeepAlive=true;
$mail->SMTPSecure = 'tls'; // ssl is depracated
$mail->SMTPAuth = true;
$mail->Username = "mailservices@b8world.com";
$mail->Password = "mAQquIkiZUzW";
$mail->SetFrom('mailservices@b8world.com', 'Bateworld');
$mail->AddReplyTo('bateworldhelp@gmail.com', 'Bateworld');
$mail->AddAddress("leprakhauns@gmail.com");
$mail->Subject = '=?UTF-8?B?TmV3IEdyb3VwIERpc2N1c3Npb24gUG9zdA==?=';
$mail->msgHTML("test body"); //$mail->msgHTML(file_get_contents('contents.html'), __DIR__); //Read an HTML message body from an external file, convert referenced images to embedded,
$mail->AltBody = 'HTML messaging not supported';
// $mail->addAttachment('images/phpmailer_mini.png'); //Attach an image file
echo "Start seconds: ".date("s")."<br>";
if(!$mail->send()){
echo "Mailer Error: " . $mail->ErrorInfo;
}else{
echo "Message sent!";
}
$mail->clearAllRecipients( );
$mail->AddAddress("lepslair@gmail.com");
$mail->Subject ="hello123";
$mail->send();
echo "<br>End seconds: ".date("s")."<br>";
exit;
?>