When Alice is creating and paying for a gift membership for Bob, she enters Bob's contact info and email address on the Membership Contribution form, so the emailed receipt goes to Bob (with a copy also going to the back office via the cc settings on the form) and Bob's email address becomes part of the contact record.
We have an optional custom field on the form where Alice can enter her own (different) email address and, ideally, receive a copy of the receipt as well.
in CiviCRM 4.6 we could make this happen by patching into postProcessMembership(), pulling the email address out of the form parameters, and tacking it onto the cc_receipt field that was passed to the sendMail function. However, in 4.7, the form handling is different enough that this method no longer works.
Is there a clean way to add a recipient to the emailed contribution receipt based on a value entered on the contribution form in CiviCRM 4.7?
thanks,