Created
April 28, 2024 19:55
-
-
Save supermarsx/dc3ef731caed425c4123f36c27edbf09 to your computer and use it in GitHub Desktop.
PHP mail example
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 | |
date_default_timezone_set($timezone); | |
$timezone = 'Europe/Lisbon'; | |
$timeformat = 'd/m/Y h:i:s a'; | |
$date = date($timeformat, time()); | |
$number = wordwrap($argv[1], 30); | |
$charLimit = 500; | |
$email = "[email protected]"; | |
$subject = "New number"; | |
$message = wordwrap( | |
strintf( | |
"Date: %s de %s.", | |
$date, $number) | |
, $charLimit); | |
mail( | |
$email, | |
$subject, | |
$message | |
); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment