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 🤔
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
This alters 2 main things:
Makes named
EmailSender
instances singletons.This means we have one instance for
HTML_FORMAT
and one instance forTEXT_FORMAT
. Currently we have one instance per injection point, which I don't believe is necessary 🤔Uses a configuration object for
fromAddress
andfromName
.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