When using Google Analytics Contact Form the tokens don't get attached to the email. Hook_mail_alter seems to executed but the changes don't get appended.

Comments

netikseo’s picture

Same for me - no data attached from Google Analytics Contact Form when using Mime Mail. Please fix it.

Thanks!

sgabe’s picture

Title: hook_mail_alter changes from other modules aren't respected » Allow custom mail keys
Project: Mime Mail » Google Analytics Email (Contact Form, Webform, Rules)
Version: 7.x-1.0-alpha2 » 7.x-1.x-dev
Category: bug » feature

I have tested the hook_mail_alter() and it seems to work fine, the changes are there in the emails.

After a quick look on Google Analytics Contact Form, I think the issue is about the message identifiers. The module checks for rules_action_mail, though the alpha2 version of Mime Mail uses rules_action_mimemail_ and the latest development snapshot allows to set a custom key for the messages. See #962226: Allow custom mailkeys for system and Rules action messages for more information.

Google Analytics Contact Form should provide support for this feature. I see this is already a TODO for the maintainer. I am moving the issue there as a feature request.