It seems possible to do this because in SimpleMessage.php we have
Well, you can set the name, but there is nothing to indicate that you can set it using the configuration.
A quick reset of the available configuration for SwitfMailerBundle ( php app/console config:dump-reference SwiftmailerBundle ) will return:
Default configuration for "SwiftmailerBundle" swiftmailer: transport: smtp username: ~ password: ~ host: localhost port: false encryption: ~ auth_mode: ~ spool: type: file path: %kernel.cache_dir%/swiftmailer/spool sender_address: ~ antiflood: threshold: 99 sleep: 0 delivery_address: ~ disable_delivery: ~ logging: true
As you can see, there is sender_address , which is passed to ImpersonatePlugin.php .
I'm not sure you can set a name, but the standard way is to use a line of this form:
"Administrator"
If this does not work, it probably means that you will work to write a real EmailManager.
SwiftMailerBundle is actually only an integration of the SwiftMailer library, which is a library, not a "manager."
source share