Php mail error in beginner's application
Posted: 18. December 2023 07:42
Good day administrator
Please the below php function objects is not working in my server.
I'm on window 8.1 x86, xampp 3.2, php 7.2 and trying to send email using the below function object
Below are my code:
Please the below php function objects is not working in my server.
I'm on window 8.1 x86, xampp 3.2, php 7.2 and trying to send email using the below function object
- Code: Select all
mail()
Below are my code:
- Code: Select all
<?php
$to = 'recipients@email-address.com';
$subject = 'Hello from XAMPP!';
$message = 'This is a test';
$headers = "From: your@email-address.com\r\n";
if (mail($to, $subject, $message, $headers)) {
echo "SUCCESS";
} else {
echo "ERROR";
}