-
-
Save eridesigns/b6f2a9abf40b1c98540b to your computer and use it in GitHub Desktop.
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 = "Learning how to send an Email in WordPress"; | |
$content = "WordPress knowledge"; | |
$headers = array( | |
'Reply-To' => "Gustavo Bordoni <[email protected]>" | |
); | |
$status = wp_mail($to, $subject, $content, $headers); |
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 = "Learning how to send an Email in WordPress"; | |
$content = "WordPress <b>knowledge<b>"; | |
add_filter( 'wp_mail_content_type', 'set_html_content_type' ); | |
$status = wp_mail($to, $subject, $content); | |
// Reset content-type to avoid conflicts -- http://core.trac.wordpress.org/ticket/23578 | |
remove_filter( 'wp_mail_content_type', 'set_html_content_type' ); | |
function set_html_content_type() { | |
return 'text/html'; | |
} |
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 = array( | |
"Gustavo Bordoni <[email protected]>", | |
"WordPress Developer <[email protected]>", | |
"[email protected]" | |
); | |
$subject = "Learning how to send an Email in WordPress"; | |
$content = "WordPress knowledge"; | |
$status = wp_mail($to, $subject, $content); |
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 = "Learning how to send an Email in WordPress"; | |
$content = "WordPress knowledge"; | |
$status = wp_mail($to, $subject, $content); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment