Closed (fixed)
Project:
Mime Mail
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
22 Apr 2012 at 16:40 UTC
Updated:
13 May 2012 at 16:30 UTC
I copied the mimemail-message.tpl.php file into my theme's directory and I wanted to print the recipient's e-mail address.
I did this using:
<?php
print $recipient;
?>
The first several times I did this, it printed the recipient's e-mail address.
However, after awhile, I started receiving this error:
Recoverable fatal error: Object of class stdClass could not be converted to string in include() (line 39 of /srv/bindings/b81d191a00ba47918fed128c2b472257/code/sites/all/themes/omtheme/mimemail-message.tpl.php).
Inspecting with dpm(), I saw that somehow instead of returning the recipient's e-mail address the module began returning the user object of the recipient.
Which is it supposed to return?
Comments
Comment #1
sgabe commentedThe $recipient is either a string, a user object or an array. In your custom theme you should implement THEME_preprocess_mimemail_message(&$variables) with something like this:
Comment #2
ptmkenny commentedThank you! That did the trick!
Comment #3.0
(not verified) commentedadded my latest findings on this issue