X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2FObj%2Fmail.phh;fp=web%2FObj%2Fmail.phh;h=9f6bfbfff5f0ac1d77b3f4323a904405ba837251;hb=ea90fe3a8a0952838a454d3613952597b1e58959;hp=0000000000000000000000000000000000000000;hpb=1a1f50c83244ae2808cc9126296c8918bd0516a4;p=brisk.git diff --git a/web/Obj/mail.phh b/web/Obj/mail.phh new file mode 100644 index 0000000..9f6bfbf --- /dev/null +++ b/web/Obj/mail.phh @@ -0,0 +1,35 @@ + "utf-8", + "html_charset" => "utf-8", + "header_charset" => "utf-8", + "eol" => "\n" ); + +// references: @ +function brisk_mail($to, $subject, $text, $html, $refs) +{ + GLOBAL $brisk_mail_hp, $G_admin_mail; + + $hdrs = array( + 'From' => $G_admin_mail, + 'Subject' => $subject, + 'References' => $refs + ); + + $mime = new Mail_mime($brisk_mail_hp); + + $mime->setTXTBody($text); + $mime->setHTMLBody($html); + + $body = $mime->get(); + $hdrs = $mime->headers($hdrs); + + $mail = Mail::factory('mail'); + + $mail->send($to, $hdrs, $body); + + return TRUE; +} +?> \ No newline at end of file