objectcomputing / check-ins

Other
7 stars 7 forks source link

Tidy up mailjet related classes and config #2526

Open timyates opened 3 days ago

timyates commented 3 days ago

This alters 2 main things:

  1. Makes named EmailSender instances singletons.

    This means we have one instance for HTML_FORMAT and one instance for TEXT_FORMAT. Currently we have one instance per injection point, which I don't believe is necessary 🤔

  2. Uses a configuration object for fromAddress and fromName.

    Currently, we use @Property(name = FROM_ADDRESS) String fromAddress to inject the values in by name. It is safer to use a typed configuration object and get the config from this instead