php - Symfony swiftmailer in production environment -


i have problem sending mails swiftmailer in symfony2. let me explain it: when go website app_dev.php, send messages, there no problem (also, when write $kernel = new appkernel('prod', true); in app.php).

so, don't understand why works in dev , not in prod.

here configuration files:

parameters.yml:

mailer_transport: smtp mailer_host: ****.ovh.net mailer_username: postmaster@mywebsite.com mailer_password: **** mailer_port: **** 

config.yml:

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

and php code, think there no problem because said there no problem in dev mode.

$message = \swift_message::newinstance() -> setsubject('test')          -> setfrom('postmaster@mywebsite.com')          -> setto($user -> getmail())          -> setbody('test'); $this -> get('mailer') -> send($message); 

thank if know problem.

if worked in dev, not prod try manually deleting prod cache directory , re-installing , dumping assets again. review checklist docs.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -