How to override wordpress wp_mail function
-
HI,
I have a problem in overriding the wp_mail function, Actually I want to send an extra email every time a wp_mail function called.
There are many places in WordPress where the wp_mail function is in use, and there may be some new plugin installed which may use the wp_mail,
so my requirements are to send an extra email when wp_mail function called.
I am trying it in this way but unable to find a way to get the parameters which I have to pass to my new mail function.
add_filter(‘wp_mail’,’my_mail_func’);
function my_mail_func(){
@mail($to,$from,$message,$headers);
}How can get the parameters?
Please help
Thank you.
- The topic ‘How to override wordpress wp_mail function’ is closed to new replies.