MailManagerInterface::mail

public MailManagerInterface::mail($module, $key, $to, $langcode, $params = array(), $reply = NULL, $send = TRUE) Composes and optionally sends an email message. Sending an email works with defining an email template (subject, text and possibly email headers) and the replacement values to use in the appropriate places in the template. Processed email templates are requested from hook_mail() from the module sending the email. Any module can modify the composed email message array using hook_mail_

MailManagerInterface

Provides an interface for sending mail. Hierarchy interface \Drupal\Component\Plugin\Discovery\DiscoveryInterface; interface \Drupal\Component\Plugin\Factory\FactoryInterface; interface \Drupal\Component\Plugin\Mapper\MapperInterfaceinterface \Drupal\Component\Plugin\PluginManagerInterfaceinterface \Drupal\Core\Mail\MailManagerInterface File core/lib/Drupal/Core/Mail/MailManagerInterface.php, line 10 Namespace Drupal\Core\Mail Members Name Modifiers Type Description Discover

MailManager::__construct

public MailManager::__construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory, LoggerChannelFactoryInterface $logger_factory, TranslationInterface $string_translation, RendererInterface $renderer) Constructs the MailManager object. Parameters \Traversable $namespaces: An object that implements \Traversable which contains the root paths keyed by the corresponding namespace to look for plugin impleme

MailManager::mail

public MailManager::mail($module, $key, $to, $langcode, $params = array(), $reply = NULL, $send = TRUE) Composes and optionally sends an email message. Sending an email works with defining an email template (subject, text and possibly email headers) and the replacement values to use in the appropriate places in the template. Processed email templates are requested from hook_mail() from the module sending the email. Any module can modify the composed email message array using hook_mail_alter().

MailManager::getInstance

public MailManager::getInstance(array $options) Overrides PluginManagerBase::getInstance(). Returns an instance of the mail plugin to use for a given message ID. The selection of a particular implementation is controlled via the config 'system.mail.interface', which is a keyed array. The default implementation is the mail plugin whose ID is the value of 'default' key. A more specific match first to key and then to module will be used in preference to the default. To specify a different plugin f

MailManager::doMail

public MailManager::doMail($module, $key, $to, $langcode, $params = array(), $reply = NULL, $send = TRUE) Composes and optionally sends an email message. Parameters string $module: A module name to invoke hook_mail() on. The {$module}_mail() hook will be called to complete the $message structure which will already contain common defaults. string $key: A key to identify the email sent. The final message ID for email altering will be {$module}_{$key}. string $to: The email address or addresses w

MailManager::$renderer

The renderer. Type: \Drupal\Core\Render\RendererInterface File core/lib/Drupal/Core/Mail/MailManager.php, line 46 Class MailManager Provides a Mail plugin manager. Namespace Drupal\Core\Mail Code protected $renderer;

MailManager::$loggerFactory

The logger factory. Type: \Drupal\Core\Logger\LoggerChannelFactoryInterface File core/lib/Drupal/Core/Mail/MailManager.php, line 39 Class MailManager Provides a Mail plugin manager. Namespace Drupal\Core\Mail Code protected $loggerFactory;

MailManager::$instances

List of already instantiated mail plugins. Type: array File core/lib/Drupal/Core/Mail/MailManager.php, line 53 Class MailManager Provides a Mail plugin manager. Namespace Drupal\Core\Mail Code protected $instances = array();

MailManager::$configFactory

The config factory. Type: \Drupal\Core\Config\ConfigFactoryInterface File core/lib/Drupal/Core/Mail/MailManager.php, line 32 Class MailManager Provides a Mail plugin manager. Namespace Drupal\Core\Mail Code protected $configFactory;