Browse Source

Add warnings that were missed before.

Refs #11988
mark_story 8 years ago
parent
commit
e2d81d4c8b
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/Mailer/Email.php

+ 2 - 0
src/Mailer/Email.php

@@ -423,6 +423,7 @@ class Email implements JsonSerializable, Serializable
      */
     public function from($email = null, $name = null)
     {
+        deprecationWarning('Email::from() is deprecated. Use Email::setFrom() or Email::getFrom() instead.');
         if ($email === null) {
             return $this->getFrom();
         }
@@ -601,6 +602,7 @@ class Email implements JsonSerializable, Serializable
      */
     public function returnPath($email = null, $name = null)
     {
+        deprecationWarning('Email::returnPath() is deprecated. Use Email::setReturnPath() or Email::getReturnPath() instead.');
         if ($email === null) {
             return $this->getReturnPath();
         }