The problem is the swiftmailer spool feature that is not flushed after the swift mailer handler sends the email. See https://github.com/symfony/symfony-standard/issues/425 for more details. This is definitely a bug and hopefully it can be fixed soon.
Symfony2: Email error not send
-
15-01-2022 - |
Question
I put my project on production server and try send email on error using this guide http://symfony.com/doc/current/cookbook/logging/monolog_email.html
Simple email normal pass from server by SwiftMailer, but error emails not send. I try set action_level to debug, remove buffer, but not works on any test errors.
I use last version symfony2 from master. What I do wrong?
monolog:
handlers:
main:
type: fingers_crossed
action_level: debug
handler: grouped
grouped:
type: group
members: [streamed, buffered]
streamed:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
buffered:
type: buffer
handler: swift
swift:
type: swift_mailer
from_email: error@audiocards.irev.ru
to_email: borzenkov@irev.ru
subject: An Error Occurred!
level: debug
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow