Skip to content

Instantly share code, notes, and snippets.

@zajca
Created June 15, 2016 10:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zajca/05862e3b11dfcf78c7a964e15c528961 to your computer and use it in GitHub Desktop.
Save zajca/05862e3b11dfcf78c7a964e15c528961 to your computer and use it in GitHub Desktop.
Symfony2 monolog swift db spool config
swiftmailer:
default_mailer: db
mailers:
db:
transport: "%mailer_transport%"
host: "%mailer_host%"
username: "%mailer_user%"
password: "%mailer_password%"
spool: { type: db }
memory:
transport: "%mailer_transport%"
host: "%mailer_host%"
username: "%mailer_user%"
password: "%mailer_password%"
spool: { type: memory }
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: grouped
console:
type: console
grouped:
type: group
members: [streamed, buffered]
streamed:
type: stream
path: '%kernel.logs_dir%/%kernel.environment%.log'
level: debug
buffered:
type: buffer
action_level: critical
handler: swift
swift:
type: swift_mailer
mailer: swiftmailer.mailer.memory
from_email: 'from@from'
to_email: 'to@to'
subject: '[ERROR][STAG]'
level: debug
my.database.swift_mailer.spool:
class: My\NotificationBundle\Spool\DatabaseSpool
arguments: ['@repository.email', '%my_spool_config%']
calls:
- [setMessageLimit, ['%my_spool_message_limit%']]
swiftmailer.spool.db:
alias: my.database.swift_mailer.spool
swiftmailer.mailer.default.spool.db:
alias: my.database.swift_mailer.spool
swiftmailer.mailer.db.spool.db:
alias: my.database.swift_mailer.spool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment