Created
July 20, 2025 16:22
-
-
Save thinkphp/2c7d194e8e05525037bf051d5359ef02 to your computer and use it in GitHub Desktop.
mail PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$to = '[email protected]'; | |
$subject = 'Test mail'; | |
$message = 'Aceasta este o scrisoare de test.'; | |
$headers = 'From: [email protected]' . "\r\n" . | |
'Reply-To: [email protected]' . "\r\n" . | |
'X-Mailer: PHP/' . phpversion(); | |
if (mail($to, $subject, $message, $headers)) { | |
echo "Email trimis cu succes!"; | |
} else { | |
echo "Emailul NU a fost trimis."; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment