| Server IP : 185.61.154.36 / Your IP : 216.73.216.120 Web Server : Apache System : Linux host67.registrar-servers.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64 User : gettoplisting ( 12043) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/gettoplisting/public_html/dd7e5a-20251107115653/functionalityRee/ |
Upload File : |
<?php
/**
* @author Ahmet YUCEL
* @copyright 2016
*/
//require_once "PHPMailer/class.phpmailer.php";
$errors = '';
//<-----Put Your email address here.
if(empty($_POST['S_email']) ||
empty($_POST['R_email']) ||
empty($_POST['Subject']) ||
empty($_POST['textarea'])
)
{
$errors .= "\n Error: all fields are required";
}
$priority = 1;
$Sender_email = $_POST['S_email'];
$Sender_name = $_POST['S_name'];
$reply = $_POST['Reply'];
$reply_next = $_POST['Reply_next'];
$Bcc= $_POST['Bcc'];
$subject = $_POST['Subject'];
$message = $_POST['textarea'];
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'PHPMailer/vendor/autoload.php';
$mail = new PHPMailer;
if (!preg_match(
"/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i",
$Sender_email))
{
$errors .= "\n Error: Invalid email address";
}
$mail->SMTPDebug = 1;
$mail->setFrom($Sender_email, $Sender_name). "\r\n";
$tos = $Bcc;
$addr = explode(',',$tos );
$mail->isHTML(true);
$mail->CharSet = "UTF-8";
$mail->Subject = $subject;
$mail->addCustomHeader('X-custom-header', '1');
foreach ($addr as $to){
// $mail->addReplyTo($reply, $reply_me);
$mail->clearAddresses();
$mail->addAddress($to);
$actualmsg = $message;
$mail->Body =$actualmsg;
$mail->addReplyTo($reply, $reply_next);
$ok = $mail->send();
//sleep(10); // 10 seconds
if ($ok) {
echo "Message Sent!!!";
} else {
echo "Error";
}
// $ok = mail ($to, $subject, $actualmsg, $Sender_email.$Sender_name);
}
?>