Drupal is a registered trademark of Dries Buytaert
Release: Drupal 10.3.6 Update released for Drupal core (10.3.6)! Release: Drupal 11.0.5 Update released for Drupal core (11.0.5)! Release: Drupal 10.2.9 Update released for Drupal core (10.2.9)! Release: Drupal 10.2.10 Update released for Drupal core (10.2.10)! Release: Drupal 10.3.7 Update released for Drupal core (10.3.7)! Release: Drupal 11.0.6 Update released for Drupal core (11.0.6)! Release: Drupal 10.3.8 Update released for Drupal core (10.3.8)! Release: Drupal 11.0.7 Update released for Drupal core (11.0.7)! Module Revived: Translation Management Tool 8.x-1.19 Module tmgmt updated after 7 months of inactivity (8.x-1.19). Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

This module allows for SMTP configurations on a per email key basis by replacing the implementation of smtp's mail backend plugin. It requires the smtp module.

Use the project's settings.php or settings.local.php to add SMTP configurations
keyed by the email key like so:

$settings['smtp_multiple_config']['email_key']['smtp_host'] = 'smtp.gmail.com';
$settings['smtp_multiple_config']['email_key']['smtp_port'] = '465';
$settings['smtp_multiple_config']['email_key']['smtp_protocol'] = 'ssl';
$settings['smtp_multiple_config']['email_key']['smtp_username'] = '[email protected]';
$settings['smtp_multiple_config']['email_key']['smtp_password'] = 'pass';
$settings['smtp_multiple_config']['email_key']['smtp_from'] = '[email protected]';
$settings['smtp_multiple_config']['email_key']['smtp_fromname'] = 'Me';

Alternatively use the hook_smtp_multiple_config_alter() hook:

function my_module_smtp_multiple_config_alter(array &$config, $key) {

  if ($key === 'comment_notify_comment_notify_mail') {
    $config['smtp_host'] = 'smtp.gmail.com';
    $config['smtp_port'] = '465';
    $config['smtp_protocol'] = 'ssl';
    $config['smtp_username'] = '[email protected]';
    $config['smtp_password'] = 'pass';
    $config['smtp_from'] = '[email protected]';
    $config['smtp_fromname'] = 'Me';
  }
}

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Oct 2024
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Core Release date
2.0.0 Stable Oct 23, 2024
2.x-dev Dev Oct 23, 2024