why not just plug it?
<?php
/*
Plugin Name: Change Email From Address/Name
Plugin URI: https://rathercurious.net
Description: changes the email from address
Version: 0.1.0
Author: Justin Adie
Author URI: https://rathercurious.net
*/
class emailFrom{
public function __construct(){
add_filter('wp_mail_from', array(&$this, 'doEmailFilter'),10, 1);
add_filter('wp_mail_from_name', array(&$this, 'doEmailNameFilter'), 10, 1);
}
public function doEmailFilter($data){
return '[email protected]';
}
public function doEmailNameFilter($data){
return 'My Name';
}
}
$_ef = new emailFrom();
?>
the annoyance that i have is that ampersands seem to come through as their literal html equivalent and the various email clients that i have (apple MAIL and Entourage) do not seem to translate back into html characters (at least in the subject). this can also be plugged if you want. add this filter to the constructor
add_filter('wp_mail', array(&$this, 'decode'), 10,1);
and add this method to the class
public function decode($array){
$array['subject'] = html_entity_decode($array['subject']);
return $array;
}