symfony - Get Swiftmailer's settings from a Controller in Symfony2 -


i have config in config.yml file

swiftmailer:     transport: "%mailer_transport%"     host:      "%mailer_host%"     username:  "%mailer_user%"     password:  "%mailer_password%"     spool:     { type: memory } 

how read these settings controller in order check whether spool has been set or not?

you move spool config in parameters.yml, example:

# app/config/parameters.yml parameters:     mailer_spool: { type: memory } 

and replace line in config.yml parameter:

# app/config/config.yml swiftmailer:     spool: "%mailer_spool%" 

now in any controller spool config like:

public function youraction() {     $spool = $this->getparameter('mailer_spool'); } 

Comments

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -