I did what tedroche did, with one exception and then it worked (v2.2 of wordpress):
in pluggable.php in wp-includes
function wp_mail($to, $subject, $message, $headers = ”) {
if( $headers == ” ) {
$headers = “MIME-Version: 1.0\n” .
“From: ” . get_settings(‘admin_email’) . “\n” .
“Content-Type: text/plain; charset=\”” . get_settings(‘blog_charset’) . “\”\n”;
# was: “From: wordpress@” . preg_replace(‘#^www\.#’, ”, strtolower($_SERVER[‘SERVER_NAME’])) . “\n” .
/*}<—HEY DELETE THIS LINE!*/
return @mail($to, $subject, $message, $headers);
}
This thread has been addressed with Andrew Hamilton‘s plugin ‘Mail From’
Here is the plugin’s homepage:
http://labs.saruken.com/
You can download the plugin from here:
http://wordpress.org/extend/plugins/mail-from/
Yeah Trent’s method should work just fine, I was actually looking for a solution for this mess. I dont want to reveal too much to anyone.
Specially, if you are on a shared hosting account, things get messy 🙂