Software: PHPMailer - PHP email class , class.phpmailer.php
function Send() {
$header = '';
$body = '';
$result = true;
if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) {
$this->SetError($this->Lang('provide_address'));
return false;
}
/* Set whether the message is multipart/alternative */
if(!empty($this->AltBody)) {
$this->ContentType = 'multipart/alternative';
}
$this->error_count = 0; // reset errors
$this->SetMessageType();
$header .= $this->CreateHeader();
$body = $this->CreateBody();
if($body == '') {
return false;
}
/* Choose the mailer */
switch($this->Mailer) {
case 'sendmail':
$result = $this->SendmailSend($header, $body);
break;
case 'smtp':
$result = $this->SmtpSend($header, $body);
break;
case 'mail':
$result = $this->MailSend($header, $body);
break;
default:
$result = $this->MailSend($header, $body);
break;
//$this->SetError($this->Mailer . $this->Lang('mailer_not_supported'));
//$result = false;
//break;
}
return $result;
}