PHP Send Email

PHOTO EMBED

Fri Aug 25 2023 08:08:20 GMT+0000 (Coordinated Universal Time)

Saved by @sentgine #php #email

$to = "recipient@example.com";
$subject = "Test Email";
$message = "This is a test email sent using PHP's mail() function.";
$headers = "From: sender@example.com";

if (mail($to, $subject, $message, $headers)) {
    echo "Email sent successfully.";
} else {
    echo "Email sending failed.";
}
content_copyCOPY