Overriding Wordpress mail function wp_mail()
In one of my previous projects i was instructed to override Wordpress function wp_mail() with custom API. I was surprised how easy it is in Wordpress. I was looking for simple solution in Wordpress, and i found it in file wp-includes/pluggable.php (where is function wp_mail() defined). Obviously Wordpress developers thinking a lot about usability for other developers, and they simply allow override the function by defining your own function before wp-includes/pluggable.php is included. So you can simply write your own plug-in overriding the function wm_mail().












