Created
May 18, 2018 23:26
-
-
Save robwent/75dde25474e7313f79d3357aebfdb2d8 to your computer and use it in GitHub Desktop.
Drop in a folder and browse to it to check php mail is working.
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 = "me@mydomain.com"; | |
| $subject = "Hi!"; | |
| $body = "Hi,\n\nHow are you?"; | |
| if (mail($to, $subject, $body)) { | |
| echo("<p>Email successfully sent!</p>"); | |
| } else { | |
| echo("<p>Email delivery failed!</p>"); | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment