Skip to content

symbiote/silverstripe-sesmail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SilverStripe SES Mailer

After installing the module, add configuration similar to the following to enable the mailer

---
Name: AWSConfig
---
SilverStripe\Core\Injector\Injector:
  SilverStripe\Control\Email\Mailer:
    class: Symbiote\SilverStripeSESMailer\Mail\SESMailer
    constructor:
      config:
        credentials:
          key: YourKey
          secret: YourSecret
        region: us-west-2
        version: '2010-12-01'
        signature_version: 'v4'

If your SES account is configured with a single 'from' address having being verified, you can set an 'always from' email address which will always be the 'From:' header, with the 'reply-to:' header set based on the calling code's 'From' variable. Just add

SilverStripe\Core\Injector\Injector:
  SilverStripe\Control\Email\Mailer:
    properties:
      alwaysFrom: [email protected]

Emails will be sent through the QueuedJobs module if it is installed. You can set the following configuration to bypass this behaviour even if QueuedJobs is installed:

SilverStripe\Core\Injector\Injector:
  SilverStripe\Control\Email\Mailer:
    calls:
      - [ setUseQueuedJobs, [ false ] ]