Hi,

I have looked into the contact.module file, and there is a function called contact_mail($key, &$message, $params).

Would be fine to be able to theme this function, so we can handle the way mails are sent. For instance my mail categories are really long, and sometimes the subject is too. So I would like to theme what will be in the subject, and the way the body is displayed.

Thanks

Comments

giorgosk’s picture

Have the same issue,
here is a very similar request
http://drupal.org/node/316471

dave reid’s picture

Status: Active » Fixed

You can use hook_mail_alter() to adjust anything in a mail sent by Drupal or the contact module.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

gpk’s picture

Related: #519498: Document that $params is available to hook_mail_alter().

[edit] The point here being that the $params used by hook_mail() to create the message in the first place are not available to hook_mail_alter(), hence changing the message body is difficult.[/edit]

gpk’s picture

Title: Beeing able to theme the way mails are sent » Being able to theme the way mails are sent

#4 can be ignored ... $message['params'] contains everything you could want for rewording/rearranging the message body.