mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
improved mail function
This commit is contained in:
parent
989f8580f6
commit
2a602d2392
1 changed files with 5 additions and 5 deletions
|
@ -100,17 +100,17 @@ function get_percentage($used,$total) {
|
|||
function send_email($to,$subject,$mailtext,$from) {
|
||||
$charset = "utf-8";
|
||||
$to = '<'.$to.'>';
|
||||
$boundary='--' . md5( uniqid("myboundary") );
|
||||
$boundary = '--' . md5( uniqid("myboundary") );
|
||||
$priorities = array( '1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)' );
|
||||
$priority = $priorities[2];
|
||||
$ctencoding = "8bit";
|
||||
$sep = chr(13) . chr(10);
|
||||
$disposition = "inline";
|
||||
$subject = "=?$charset?B?".base64_encode($subject)."?=";
|
||||
$header.="From: $from \nX-Priority: $priority\nCC: $cc\n";
|
||||
$header.="Mime-Version: 1.0\nContent-Type: text/plain; charset=$charset \n";
|
||||
$header.="Content-Transfer-Encoding: $ctencoding\nX-Mailer: Php/libMailv1.3\n";
|
||||
$message .= $mailtext;
|
||||
$header = "From: $from \nX-Priority: $priority\nCC:\n";
|
||||
$header .= "Mime-Version: 1.0\nContent-Type: text/plain; charset=$charset \n";
|
||||
$header .= "Content-Transfer-Encoding: $ctencoding\nX-Mailer: Php/libMailv1.3\n";
|
||||
$message = $mailtext;
|
||||
mail($to, $subject, $message, $header);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue