bcgov / agri-dcbr

The Ministry of Agriculture registry for dog and cat breeders and sellers.
Apache License 2.0
0 stars 5 forks source link

Implemented email logic #73

Closed esune closed 5 years ago

esune commented 5 years ago

The PR contains the changes required to implement the reminder and registration emails.

@anissa-agahchen the registration email is currently expecting as input a dictionary structured as follows:

context = {
  "operator": operator_object,
  "registration_number": registration_number_value
}

I will be tweaking the certificate based on this, however you may need to tweak this when wiring everything up.

The reminder email task will look for operators for which the expiry date is exactly the number of months specified in the configuration (REGISTRATION_VALIDITY_MONTHS), adjusting the query for beginning and end of day times in UTC timezone (this is what we are currently using). It needs further testing, I will try locally and see how it goes, but testing in OpenShift may be good as well.

The OpenShift templates and configurations have been updated accordingly and changes have been applied to DEV so far.