Create 'enqueueEmailForDelivery' util and use it in all cloud functions attempting to send emails
Update the email string validations to match a wider range of (supported) email strings
Fixes #919
Problem:
athleteSelfRegister cloud function added emails to the queue directly, without some validations (that, naturally, introduced an error: email payload should be nested under payload property, and in this case it was spread on the top level of the object) - Fixed by the 1st point ☝️
the email string (for one of the failed emails) included a + sign, which we didn't support as valid email string - Fixed by the 2nd point ☝️
Fixes #919
Problem:
payload
property, and in this case it was spread on the top level of the object) - Fixed by the 1st point ☝️+
sign, which we didn't support as valid email string - Fixed by the 2nd point ☝️