Last active
January 17, 2017 16:02
-
-
Save markbiek/030d61d23eb869772e5b1a3fe47b7645 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
| add_filter('wp_mail', 'handle_wp_mail'); | |
| function handle_wp_mail($args) { | |
| if ($args['subject'] == 'Welcome to YOUR SITE') { | |
| $newMessage = <<<EOT | |
| <h2>Welcome to YOUR SITE</h2> | |
| <p>Dear User,</p> | |
| <p>Thanks for registering!</p> | |
| EOT; | |
| $newMail = [ | |
| 'to' => $args['to'], | |
| 'subject' => $args['subject'], | |
| 'headers' => $args['headers'], | |
| 'attachments' => $args['attachments'], | |
| 'message' => $newMessage, | |
| ]; | |
| return $newMail; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment