SMTP

Skipper leverages AWS SES to ensure your emails are highly deliverable.

Usage

Set the FROM address

AWS SES requires a validated FROM address to ensure ownership.

This is set in the projects configuration file.

cat .skpr/defaults.yml

...

smtp:
  from:
    address: admin@example.com

The owner of the email address will be sent a verification email.

The status of the verification can be checked via the skpr info command.

$ skpr info dev

......


SMTP:
--------------------------
Address: admin@example.com
Verified: Success

Configuration

$ skpr config list dev | grep smtp
smtp.port               1025                                              
smtp.from.address       admin@example.com                          
smtp.password           [secret]                                          
smtp.hostname           email-smtp.us-west-2.amazonaws.com                
smtp.username           XXXXXXXXXXXXXXXXXX 

Drupal 7

The following example uses SMTP Module.

$conf['mail_system'] = array(
  'default-system' => 'SmtpMailSystem',
);
$conf['smtp_on']       = 1;
$conf['smtp_host']     = $skpr_config->get('smtp.hostname') ?: '127.0.0.1';
$conf['smtp_port']     = $skpr_config->get('smtp.port') ?: '1025';
$conf['smtp_username'] = $skpr_config->get('smtp.username') ?: '';
$conf['smtp_password'] = $skpr_config->get('smtp.password') ?: '';

Note

Defaults are set to MailHog.

Drupal 8

The following example uses Swift Mailer Module.

$config['swiftmailer.transport']['smtp_credential_provider'] = 'swiftmailer';
$config['swiftmailer.transport']['smtp_host'] = $skpr_config->get('smtp.hostname') ?: '127.0.0.1';
$config['swiftmailer.transport']['smtp_port'] = $skpr_config->get('smtp.port') ?: '1025';
$config['swiftmailer.transport']['smtp_credentials']['swiftmailer']['username'] = $skpr_config->get('smtp.username') ?: '';
$config['swiftmailer.transport']['smtp_credentials']['swiftmailer']['password'] = $skpr_config->get('smtp.password') ?: '';

Note

Defaults are set to MailHog.

Deep Dive