Skip to content

Commit

Permalink
Merge pull request PHPMailer#208 from mirovit/patch-1
Browse files Browse the repository at this point in the history
Optimize an if statement
  • Loading branch information
Synchro committed Apr 1, 2014
2 parents d1d3fb6 + 96e4a2e commit d4aea20
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions class.phpmailer.php
Expand Up @@ -1024,12 +1024,12 @@ public function postSend()
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());
Expand Down

0 comments on commit d4aea20

Please sign in to comment.