View more context

 

bendubuisson

Does anyone know how to override the default Mail functionality to use SMTP? In SS4 we would do:

  1. Name: myemailconfig
  2. After:
  3. - '#emailconfig'
  4. ---
  5. SilverStripe\Core\Injector\Injector:
  6. Swift_Transport:
  7. class: Swift_SmtpTransport
  8. properties:
  9. Host: http://smtp.sendgrid.net
  10. calls:
  11. Username: [ setUsername, ['`SENDGRID_SMTP_USERNAME`'] ]
  12. Password: [ setPassword, ['`SENDGRID_SMTP_PASSWORD`'] ]
  13. AuthMode: [ setAuthMode, ['login'] ]
bendubuisson

Swift_Transport doesn’t seem to be a thing in SS3

bendubuisson

Looks like SwiftMailer is only used in SS4 😞

nightjarnz

yes, that's correct. There is an smtp module for ss3 though @bendubuisson

nightjarnz

essentially: replace the Mailer class with an SMTP using backend, iirc. But that's only from the top of my head - use the module :)

bendubuisson

do you know happen to know what it’s called? Lots of broken links...