Closed hkdobrev closed 6 years ago
Actually looking more into Swift Mailer's code, I don't think we should be doing that. The Swift_Transport
interface states the returned result from the send()
method is the number of recipients. We are currently returning the number of emails (which matches most Swift Mailer's transports anyway). Changing what the class does and still implementing the transport interface would be breaking the Liskov principle and could be unexpected in many ways including if the transport is wrapped in a spool transport.
I think triggering an event which we do is the better way to go about this. The
official Wildbit transport (it is quite simplistic in terms of what it does with Swift Mailer) - already returns the API response on the send()
method which is wrong and they don't use the dispatcher at all and don't even send the sendPerformed
event which would break many plugins relying on it.
Feel free to comment on this issue, if you think my logic is flawed.
/cc @BradEstey @sprain
See #21 for more details.