Created
November 30, 2018 21:49
-
-
Save eto4detak/2853420dad208e0a30d312f399832976 to your computer and use it in GitHub Desktop.
wp php email
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 | |
function sendEmail($fromEmail,$fromEmailName,$toEmail,$toEmailName,$subject,$message,$extra='') { | |
$headers = 'MIME-Version: 1.0' . "\r\n"; | |
$headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n"; | |
$headers .= 'To: '.$toEmailName.' <'.$toEmail.'>' . "\r\n"; | |
$headers .= 'From: '.$fromEmailName.' <'.$fromEmail.'>' . "\r\n"; | |
if(wp_mail($toEmail,$subject,$message,$headers)) { | |
}else { | |
@mail($toEmail,$subject,$message,$headers); | |
} | |
} | |
sendEmail(get_bloginfo("admin_email"),get_bloginfo('name'),'[email protected]',get_bloginfo('name'),__("Question report","vbegy"),'ee dfsd dfs f sd ff'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment