Skip to content

Commit

Permalink
Fix up e-notice error when using a user from email address same issue…
Browse files Browse the repository at this point in the history
… as dev/core#644
  • Loading branch information
seamuslee001 committed Mar 1, 2019
1 parent 08cacc3 commit 5b8e26b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CRM/Contribute/Form/Task/PDF.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,12 @@ public function postProcess() {

$values = array();
if (isset($params['from_email_address']) && !$elements['createPdf']) {
// If a logged in user from email is used rather than a domain wide from email address
// the from_email_address params key will be numerical and we need to convert it to be
// in normal from email format
$from = CRM_Utils_Mail::formatFromAddress($params['from_email_address']);
// CRM-19129 Allow useres the choice of From Email to send the receipt from.
$fromDetails = explode(' <', $params['from_email_address']);
$fromDetails = explode(' <', $from);
$input['receipt_from_email'] = substr(trim($fromDetails[1]), 0, -1);
$input['receipt_from_name'] = str_replace('"', '', $fromDetails[0]);
}
Expand Down

0 comments on commit 5b8e26b

Please sign in to comment.