0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 18:03:04 +02:00

Merge pull request #208 from mirovit/patch-1

Optimize an if statement
This commit is contained in:
Marcus Bointon 2014-04-01 14:35:55 +02:00
commit d4aea20890

View File

@ -1024,12 +1024,12 @@ class PHPMailer
case 'mail':
return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
default:
if (method_exists($this, $this->Mailer.'Send')) {
$sendMethod = $this->Mailer.'Send';
$sendMethod = $this->Mailer.'Send';
if (method_exists($this, $sendMethod)) {
return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody);
} else {
return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
}
return $this->mailSend($this->MIMEHeader, $this->MIMEBody);
}
} catch (phpmailerException $e) {
$this->setError($e->getMessage());