Merge pull request #4759 from edlinklater/3.2-mailer-validemailaddr

Handle incorrectly deprecated validEmailAddr methods
This commit is contained in:
Damian Mooyman 2015-11-10 13:36:15 +13:00
commit 8368ead424

View File

@ -451,6 +451,14 @@ class Mailer extends Object {
return $headers . $file['contents'];
}
/**
* @deprecated since version 4.0
*/
public function validEmailAddr($emailAddress) {
Deprecation::notice('4.0', 'This method will be removed in 4.0. Use protected method Mailer->validEmailAddress().');
return $this->validEmailAddress($emailAddress);
}
/**
* Cleans up emails which may be in 'Name <email@silverstripe.com>' format
*
@ -596,8 +604,8 @@ function QuotedPrintable_encode($quotprint) {
* @deprecated 3.1
*/
function validEmailAddr($emailAddress) {
Deprecation::notice('4.0', 'Use Email->validEmailAddr() instead');
Deprecation::notice('4.0', 'This method will be removed in 4.0. Use protected method Mailer->validEmailAddress().');
$mailer = Injector::inst()->create('Mailer');
return $mailer->validEmailAddr($emailAddress);
return $mailer->validEmailAddr($emailAddress);
}