I need to be able to set the sender address statically in order to get through my host's smtp gateway. can you tell me where in the code I have to change that? I've tried a few places, but I can't get it to send.

brett

Comments

allie micka’s picture

Status: Active » Closed (won't fix)

Interesting.

For the time being, I don't think I'm going to make this an option in mimemail. However, you can make this change in a separate module using hook_mail_alter:

http://api.drupal.org/api/5/function/hook_mail_alter

e.g, create a file called examplemodule.module :

function examplemodule_mail_alter(&$mailkey, &$to, &$subject, &$body, &$from, &$headers) { 
  $from = 'mailbox@example.com';
} 

FWIW, there's almost always a way to do something like this in Drupal by implementing your own module, and you shouldn't have to change drupal core or contrib modules directly.