Skip to content

Commit

Permalink
Allow implementation of additional sending mechanisms by setting Mail…
Browse files Browse the repository at this point in the history
…er to X and implementing XSend method.
  • Loading branch information
michield committed Sep 20, 2013
1 parent 7492986 commit c8cacb1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion class.phpmailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1021,7 +1021,12 @@ public function postSend()
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());
Expand Down

0 comments on commit c8cacb1

Please sign in to comment.