plain-solutions-gmbh / kirby-form-block-suite

This form plugin for Kirby offers you maximum flexibility and usability. It can be used as a block anywhere you needed. This repository replaces the obsolete version 2.0.
Other
38 stars 11 forks source link

Set fallback for notify_reply to getEmail() #56

Closed purplespider closed 1 month ago

purplespider commented 1 month ago

This sets the fallback for notify_reply (the reply-to address) to the existing getEmail() method that seeks out email fields automatically.

This means there is no need to manually specify notify_reply, and also allows for an email field to be optional while still using it for the "reply to" address if it gets filled in.

The getEmail() method throws an exception if no email field is found. This PR allows that exception to be bypassed if the method is being called to find an "reply to" address, so that if no email is found, then the "reply to" header just doesn't get added.