I need to disable the validation of ssl certificate for developing purpose but i don't find anything about this in official documentation. http://swiftmailer.org/docs/introduction.html
I'm using php 5.6 and Symfony2 (v2.7).
The configuration reference of SwiftMailerBundle is:
swiftmailer:
transport: smtp
username: ~
password: ~
host: localhost
port: false
encryption: ~
auth_mode: ~
spool:
type: file
path: '%kernel.cache_dir%/swiftmailer/spool'
sender_address: ~
antiflood:
threshold: 99
sleep: 0
delivery_address: ~
disable_delivery: ~
logging: '%kernel.debug%'
The configuration option suggested by Maxim didn't work for me (Symfony 3.4 and Swift Mailer 5.4)
The cleanest solution I could find is the following:
where
$mailer
is your SwiftMailer instance which you use in some service or controllerGetting the
swiftmailer.mailer.default.transport
from Symfony and setting following configuration works for me:I don't think that it is possible to set the stream options in the .yml file.
I found an undocumented feature
symfony 2.8, php 5.6, swiftmailer-bundle 2.5.3
Swiftmailer Configuration
I think this is a dirty hack but it works for me fine ;)