Commit d3f58a52 authored by Nathaniel Catchpole's avatar Nathaniel Catchpole
Browse files

Issue #2359453 by JeroenT: Remove drupal_mail_system()

parent 9e163fc5
......@@ -122,28 +122,3 @@
function drupal_mail($module, $key, $to, $langcode, $params = array(), $reply = NULL, $send = TRUE) {
return \Drupal::service('plugin.manager.mail')->mail($module, $key, $to, $langcode, $params, $reply, $send);
* Returns an instance of the mail plugin to use for a given message ID.
* @param string $module
* The module name which was used by drupal_mail() to invoke hook_mail().
* @param string $key
* A key to identify the email sent. The final message ID for the email
* alter hook in drupal_mail() would have been {$module}_{$key}.
* @return \Drupal\Core\Mail\MailInterface
* A mail plugin instance.
* @throws \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException
* @see \Drupal\Core\Mail\MailManager::getInstance()
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0.
* Use \Drupal::service('plugin.manager.mail')->getInstance() in procedural
* code. In Object-Oriented code inject the 'plugin.manager.mail' service and
* use the ::getInstance() method.
function drupal_mail_system($module, $key) {
return \Drupal::service('plugin.manager.mail')->getInstance(array('module' => $module, 'key' => $key));
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment