Merge pull request #110 from michield/master

Allow implementation of additional sending mechanisms by setting Mailer ...
This commit is contained in:
Marcus Bointon 2013-09-20 06:55:29 -07:00
commit 57b183bf6a
1 changed files with 6 additions and 1 deletions

View File

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