email - Configure SMTP host from php.ini -


i'm trying configure swiftmailer's smtp transport looking @ php.ini. i've tried creating compilerpass alter mailer_host parameter, changed value doesn't seem influence container gets built.

on second attempt, tried requesting service definition swiftmailer.mailer.default.transport."something", can't seem find correct service either.

any pointers?

thanks

ok, found out can alter configuration of other bundles using prependextensioninterface. after implementing interface in own extension, this:

public function prepend(containerbuilder $container) {     $container->prependextensionconfig(         'swiftmailer',          array ('host' => ini_get('smtp'))     ); } 

i'm aware there better solutions this. instance, placing swiftmailer configuration in server-wide .yml file , including that. offer more flexibility etc., now, fine.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -