ÿØÿà JPEG ÿþ;
| Server IP : 68.65.120.201 / Your IP : 216.73.216.221 Web Server : LiteSpeed System : Linux server179.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64 User : taxhyuvu ( 2294) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/home/./taxhyuvu/././www/ |
Upload File : |
<?php
// Include PHPMailer manually (no Composer required)
require 'PHPMailer/PHPMailer.php';
require 'PHPMailer/SMTP.php';
require 'PHPMailer/Exception.php';
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
function sendEmail($toEmail, $fullName, $username, $phoneNumber) {
$mail = new PHPMailer(true);
try {
// SMTP Configuration
$mail->isSMTP();
$mail->Host = 'smtp.gmail.com'; // Your SMTP Host
$mail->SMTPAuth = true;
$mail->Username = '786.taxhelpline@gmail.com'; // Your SMTP Email
$mail->Password = 'cllg lep3 ephd n4aj xnbz qg6b 3vpq ihbn'; // ⚠️ Use an App Password for Gmail (Don't use your real password)
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->Port = 587;
// Sender & Recipient
$mail->setFrom('info@taxhelplines.com.pk', 'TaxHelpline');
$mail->addAddress($toEmail, $fullName);
// Email Content
$mail->isHTML(true);
$mail->Subject = 'Welcome to TaxHelpline';
$mail->Body = "
<html>
<body>
<h2>Welcome to TaxHelpline, $fullName!</h2>
<p>Dear <b>$username</b>,</p>
<p>Your account has been created successfully.</p>
<p><b>Email:</b> $toEmail</p>
<p><b>Phone Number:</b> $phoneNumber</p>
<br>
<p>For any issues, visit our website: <a href='https://taxhelplines.com.pk'>TaxHelpline</a></p>
<p>Best Regards,<br><b>TaxHelpline Team</b></p>
</body>
</html>
";
// Send Email
$mail->send();
echo "<script>alert('Email sent successfully!');</script>";
} catch (Exception $e) {
echo "<script>alert('Message could not be sent. Error: {$mail->ErrorInfo}');</script>";
}
}
// Check if form is submitted
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['email'])) {
$email = $_POST['email'];
$fullName = "Syed Hasnain Raza"; // Change as needed
$username = "hasnain"; // Change as needed
$phoneNumber = "0304445678"; // Change as needed
sendEmail($email, $fullName, $username, $phoneNumber);
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Send Email</title>
</head>
<body>
<h2>Send Welcome Email</h2>
<form method="post">
<label for="email">Recipient Email:</label>
<input type="email" name="email" required>
<button type="submit">Send Email</button>
</form>
</body>
</html>