3 ms·
This is pretty much how we deal with this in a DI framework anyway. The constructor of the transport takes the host and the send method takes the message. e
by buffoon 11y ago
This is pretty much how we deal with this in a DI framework anyway. The constructor of the transport takes the host and the send method takes the message.
emailSender = SMTPSender(host='localhost') # in container
emailSender.send(message) # in implementation
The consumer of the SMTPSender only interacts with the send() method.