Email-Invoices fails since 4.7.31 because of invalid From-Addresses
Reproduce:
- Enable Tax and Invoicing (in "CiviContribute Component Settings")
- Setup a From-Email-Adress
- Create a Contribution
- Use "Email Invoice" to send an Invoice.
You get: "Validation failed for: from-email-address"
The reason could be found in CRM/Contribute/Form/Task/Invoice.php[460:465]:
$fromEmail = CRM_Core_BAO_Email::getFromEmail();
// from email address
if (isset($params['from_email_address'])) \{
$fromEmailAddress = CRM_Utils_Array::value($params['from_email_address'], $fromEmail);
}
The values of $fromEmail are html-escaped versions of the email-adresses. They might be useful for Select-Options in HTML-Forms. But they won't work for real email-headers.