if this- smtp_send this- smtpmail mail_to subject message headers else

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
if ($this->smtp_send)
{
$this->smtpmail ($mail_to, $subject, $message, $headers);
}
else
{
$this->send_mime_mail($this->smtp_from, $this->smtp_username, '', $email_to, $this->smtp_charset, $this->smtp_charset, $subject, $message, $this->$html);
}
}
function smtpmail ($mail_to, $subject, $message, $headers='')
{
$this->load_settings();
$SEND = "Date: ".date("D, d M Y H:i:s") . " UT\r\n";
// $SEND .= 'Subject: =?'.$this->smtp_charset.'?B?'.base64_encode($subject)."=?=\r\n";
$SEND .= 'Subject: '.$subject."\r\n";
if ($headers) $SEND .= $headers."\r\n\r\n";
else
{
$SEND .= "Reply-To: ".$this->smtp_username."\r\n";
$SEND .= "MIME-Version: 1.0\r\n";
$SEND .= "Content-Type: text/plain; charset=\"".$this->smtp_charset."\"\r\n";
$SEND .= "Content-Transfer-Encoding: 8bit\r\n";
$SEND .= "From: \"".$this->smtp_from."\" <".$this->smtp_username.">\r\n";
$SEND .= "To: <$mail_to>\r\n";
$SEND .= "X-Priority: 3\r\n\r\n";
}
$SEND .= $message."\r\n";