set swiftmailer in symfony2

  • Posted June 5, 2014

hello everybody I’ll really appreciate your help on this as I’m trying to sent a simple email and I can not

here is my config.yml <pre> swiftmailer: transport: sendmail host: /usr/bin/sendmail username: %mailer_user% password: %mailer_password% spool: type: file path: “%kernel.cache_dir%/swiftmailer/spool” </pre> I see the emails keep on spool and they are never released

Event after enter this command in console php app/console swiftmailer:spool:send --env=prod

/for more details here is my controller code/ <pre> $message = \Swift_Message::newInstance() //->attach($attachment) ->setContentType(“text/html”) ->setSubject(‘Hello Email’) ->setFrom(‘’) ->setTo(‘’) ->setBody( $this->renderView( ‘MasEventosSICBundle:Welcome:registration.html.twig’, array(‘name’ => $name) ) ) ; $this->get(‘mailer’)->send($message);

This does not throw any exception but the emails are not sent I think my knowledge is not enough to see the cause Thanks a lot in advance Cheers


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I have the same fuck issue

I too would like an answer to this question.

Did you get some answer for this? I’m in the same boat!!