Merge pull request #6798 from eileenmcnaughton/master
[civicrm-core.git] / CRM / Utils / Mail.php
index 37d304e3ed7c1271d1fb943a6ce740d50b9bcafb..7986f84eacdfc50239475a9590269556757f49c7 100644 (file)
@@ -260,7 +260,7 @@ class CRM_Utils_Mail {
 
     $to = array($params['toEmail']);
     $result = NULL;
-    $mailer = \Civi\Core\Container::singleton()->get('pear_mail');
+    $mailer = \Civi::service('pear_mail');
 
     // Mail_smtp and Mail_sendmail mailers require Bcc anc Cc emails
     // be included in both $to and $headers['Cc', 'Bcc']