Remove the extra headers from the e-mails sent My site is made of book(book pages) and any authenticated user is able to send the book page as an e-mail to anybody (other user in the site / external user using e-mail) he wishes. The mail system is working fine but when (lets say) User1(user1@example.com) is sending mail to anyone, the sent mail headers are as follows: 


  site_admin@example.com on behalf of user1@example.com


I want that a user should be able to send the email directly by his e-mail id.

I am using Drupal 7, with Print and SMTP configured to send to book pages.
Apparently someone came up with code to put in a custom module that will remedy this issue:

http://drupal.org/node/461324

I've yet to try it though.

UPDATE:

I tried out an altered version and it worked for me. Here's what I had:

email_sender_override.info:

name = E-mail Sender Override
description = Overrides the 'Sender' of an e-mail message with the 'From' address.
core = 7.x
package = Webform


email_sender_override.module:

&lt;?php
/**
  * @file
  *
  * Mail altering function to override the 'Sender' of a mail message with the address
  * in the 'From' field.
  *
  */

/**
  * email_sender_override_mail_alter
  *
  * Alters the sender of the e-mail message to be the same as the 'From' address.
  * Taken from: http://drupal.org/node/461324
  * See also:   http://api.drupal.org/api/drupal/includes!mail.inc/function/drupal_mail/6#comment-3243
  *             http://drupal.org/node/656472
  *
  * @param message
  *    the full e-mail message being sent -- this will be altered
  */
function email_sender_override_mail_alter(&amp;$message)
{
    $message['headers']['Sender'] = $message['headers']['From'];
}
?&gt;