Skip to content

Instantly share code, notes, and snippets.

@karamansky
Last active July 10, 2024 17:30
Show Gist options
  • Save karamansky/45cf3e493ff78b1ebdd1836dd3405c98 to your computer and use it in GitHub Desktop.
Save karamansky/45cf3e493ff78b1ebdd1836dd3405c98 to your computer and use it in GitHub Desktop.
WordPress: Custom send email
public static function SendEmails(){
$message = 'User tried to log in with phone number: ' . 000 . '<br/>';
$headers = array(
'From: No-Reply <no-reply@' . $_SERVER['HTTP_HOST'] . '>',
'content-type: text/html'
);
wp_mail('[email protected]', 'Mail subject text here', $message, $headers);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment