Posted by jmcintyre on November 7, 2010 at 1:03am
3 followers
| Project: | Webform |
| Version: | 6.x-3.4 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Specifying a "Subject" in theme_webform_mail_headers() results in an email whose subject line reads simply "default." The problem seems to be in these lines in webform_client_form_submit():
<?php
// Update the subject if set in the themed headers.
if (isset($email['headers']['Subject'])) {
$email['headers']['subject'] = $email['headers']['Subject'];
unset($email['headers']['Subject']);
}
else {
$email['subject'] = webform_format_email_subject($email['subject'], $node, $submission);
}
?>The mail function uses $email['subject'], not $email['headers']['subject']. Rewriting the above worked for me:
<?php
// Update the subject if set in the themed headers.
if (isset($email['headers']['Subject'])) {
$email['subject'] = $email['headers']['Subject'];
unset($email['headers']['Subject']);
}
else {
$email['subject'] = webform_format_email_subject($email['subject'], $node, $submission);
}
?>
Comments
#1
Patch to fix the issue reported above.
#2
Weird, I thought we fixed this exact problem once before. Change looks right to me.
#3
Yup, it's right. Look at the similar 'from' block just above.
(Problem traced independently, then found this patch & tested.)
#4
We've fixed this issue already separately from this issue. The change looks like it's already in the current version.