systopia / de.systopia.eventmessages

CiviCRM Custom Event Communication Extension
Other
4 stars 6 forks source link

Don't send email if "outbound email" is deactivated #10

Closed bjendres closed 1 year ago

bjendres commented 3 years ago

Trying to send an email while "outbound email" is deactivated in CiviCRM (civicrm/admin/setting/smtp) can cause the whole process to be killed, including rolling back the transaction that triggered the email in the first place, e.g. an event registration. This can potentially derail a whole lot of processes.

It would make sense to make sure that the system doesn't even attempt to send out an email in this scenario, and rather issues a log message.

jensschuppe commented 3 years ago

This would be working around CiviCRM Core issuing a redirect when outbound e-mail is disabled, which causes trouble in all kinds of scenarios. We should consider filing a Core PR for completely removing that redirect and replacing it with a warning being logged ore whatever makes most sense. I'd suggest just documenting this design flaw, since using this e-mail-based extension with outbound e-mail disabled doesn't really make sense in the first place, right?