$defaults = array(
'toName' => $contact['display_name'],
'toEmail' => $contact['email'],
- 'subject' => ts('Thank you for your contribution/s'),
'text' => '',
'html' => $html,
);
$emails = array_keys($emails);
$defaults['from'] = array_pop($emails);
}
+ if (!empty($params['subject'])) {
+ $defaults['subject'] => $params['subject'];
+ }
+ else {
+ $defaults['subject'] => ts('Thank you for your contribution/s');
+ }
if ($is_pdf) {
$defaults['html'] = ts('Please see attached');
$defaults['attachments'] = array(CRM_Utils_Mail::appendPDF('ThankYou.pdf', $html, $format));