yiisoft / yii2-swiftmailer

Yii 2 swiftmailer extension.
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
116 stars 74 forks source link

Added wrapper for SwiftMessage addTo #84

Closed ngardner closed 4 years ago

ngardner commented 4 years ago

Added wrapper for SwiftMessage addTo, so recipients can be added iteratively

Q A
Is bugfix? no
New feature? yes
Breaks BC? no
Tests pass?
Fixed issues
samdark commented 4 years ago

Usability-wise it's OK but adding it to swiftmailer implementation without adding it to MessageInterface means it won't be available in other implementations so using would mean project won't be able to switch implementations.

samdark commented 4 years ago

It is fine for your own project but not a good idea for framework overall. Instead:

  1. Extend from Message, add the method.
  2. When configuring mailer specify $messageClass.