File: //data/Test/mail.php
<?php
require 'vendor/autoload.php';
$mail = new PHPMailer\PHPMailer\PHPMailer();
// SMTP configuration
$mail->isSMTP();
$mail->Host = 'smtp.mandrillapp.com'; // Replace with your SMTP host
$mail->SMTPAuth = true;
$mail->Username = 'support@rukkor.com'; // Replace with your SMTP username
$mail->Password = 'KyiAvYwGBBvaUcSAbCGzaQ'; // Replace with your SMTP password
$mail->SMTPSecure = 'tls'; // Use 'tls' or 'ssl'
$mail->Port = 587; // Use 587 for tls, or 465 for ssl
// Email content
$mail->setFrom('support@rukkor.com', 'Rukkor AB'); // Replace with your sender info
$mail->addAddress('jaydip.chabhadiya@dignizant.com', 'Jaydip'); // Replace with recipient info
$mail->Subject = 'SMTP Test Email';
$mail->Body = 'This is a test email sent from a PHP script using PHPMailer.';
// Send email
if ($mail->send()) {
echo "Email sent successfully!";
} else {
echo "Mailer Error: " . $mail->ErrorInfo;
}
?>