mirror of
https://github.com/PHPMailer/PHPMailer.git
synced 2024-09-20 18:03:04 +02:00
Optimize an if statement
Optimized the if statment in postSend() method in default case
This commit is contained in:
parent
d1d3fb6159
commit
96e4a2e86c
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user