Created
May 20, 2010 15:13
-
-
Save lukemorton/407679 to your computer and use it in GitHub Desktop.
This file contains 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
This file contains 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 | |
// Most simple mail() | |
mail( | |
'Luke <[email protected]>', | |
'Testing 1', | |
'This is the main message!!' | |
); | |
// mail() with additional headers | |
mail( | |
'Luke <[email protected]>', | |
'Testing 2', | |
'This is the main message!!', | |
'From: Luke 2 <[email protected]>' . "\r\n" . | |
'Reply-To: Luke 3 <[email protected]>' . "\r\n" | |
); | |
// mail() with additional headers and -f | |
mail( | |
'Luke <[email protected]>', | |
'Testing 3', | |
'This is the main message!!', | |
'From: Luke 2 <[email protected]>' . "\r\n" . | |
'Reply-To: Luke 3 <[email protected]>' . "\r\n", | |
'-f [email protected]' | |
); | |
// With proper name in -f | |
mail( | |
'Luke <[email protected]>', | |
'Testing 4', | |
'This is the main message!!', | |
'From: Luke 2 <[email protected]>' . "\r\n" . | |
'Reply-To: Luke 3 <[email protected]>' . "\r\n", | |
'-f Proper Name <[email protected]>' | |
); | |
// With proper name in -f and no headers | |
mail( | |
'Luke <[email protected]>', | |
'Testing 5', | |
'This is the main message!!', | |
null, | |
'-f Proper Name <[email protected]>' | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment