Sometimes, especially when testing email sending from test environments, you may encounter SSL issues, due to being unable to verify the peer, or self-signed certs.
with the swiftmailer transport, you can disable that checking via yaml:
SilverStripe\Core\Injector\Injector:
Swift_Transport:
class: Swift_SmtpTransport
properties:
Host: smtp.youmail.com
Port: 587
Encryption: tls
calls:
Username: [ setUsername, ['username'] ]
Password: [ setPassword, ['password'] ]
AuthMode: [ setAuthMode, ['login'] ]
StreamOptions:
- setStreamOptions
- args:
ssl:
allow_self_signed: true
verify_peer: false
verify_peer_name: false
It took a while to get that yaml syntax working