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 <supportlm@myfreeola.com>', | |
'Testing 1', | |
'This is the main message!!' | |
); | |
// mail() with additional headers | |
mail( | |
'Luke <supportlm@myfreeola.com>', | |
'Testing 2', | |
'This is the main message!!', | |
'From: Luke 2 <supportlm@myfreeola.com>' . "\r\n" . | |
'Reply-To: Luke 3 <supportlm@myfreeola.com>' . "\r\n" | |
); | |
// mail() with additional headers and -f | |
mail( | |
'Luke <supportlm@myfreeola.com>', | |
'Testing 3', | |
'This is the main message!!', | |
'From: Luke 2 <supportlm@myfreeola.com>' . "\r\n" . | |
'Reply-To: Luke 3 <supportlm@myfreeola.com>' . "\r\n", | |
'-f supportlm@myfreeola.com' | |
); | |
// With proper name in -f | |
mail( | |
'Luke <supportlm@myfreeola.com>', | |
'Testing 4', | |
'This is the main message!!', | |
'From: Luke 2 <supportlm@myfreeola.com>' . "\r\n" . | |
'Reply-To: Luke 3 <supportlm@myfreeola.com>' . "\r\n", | |
'-f Proper Name <supportlm@myfreeola.com>' | |
); | |
// With proper name in -f and no headers | |
mail( | |
'Luke <supportlm@myfreeola.com>', | |
'Testing 5', | |
'This is the main message!!', | |
null, | |
'-f Proper Name <supportlm@myfreeola.com>' | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment