RE: Leaf PHP Mailer error 12-16-2023, 10:54 PM
#2
Have you tried this?
Code:
<?php
$to = "recipient@example.com";
$subject = "Test Email";
$message = "This is a test email.";
$headers = "From: your_email@example.com\r\n";
$headers .= "Reply-To: your_email@example.com\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();
// Use the mail() function to send the email
$mailResult = mail($to, $subject, $message, $headers);
// Check if the email was sent successfully
if ($mailResult) {
echo "Email sent successfully!";
} else {
echo "Error sending email.";
}
?>
(This post was last modified: 12-16-2023, 10:54 PM by JefeNoMas.)