Skip to content

Commit 2a602d2

Browse files
committed
improved mail function
1 parent 989f858 commit 2a602d2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

web/inc/main.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,17 @@ function get_percentage($used,$total) {
100100
function send_email($to,$subject,$mailtext,$from) {
101101
$charset = "utf-8";
102102
$to = '<'.$to.'>';
103-
$boundary='--' . md5( uniqid("myboundary") );
103+
$boundary = '--' . md5( uniqid("myboundary") );
104104
$priorities = array( '1 (Highest)', '2 (High)', '3 (Normal)', '4 (Low)', '5 (Lowest)' );
105105
$priority = $priorities[2];
106106
$ctencoding = "8bit";
107107
$sep = chr(13) . chr(10);
108108
$disposition = "inline";
109109
$subject = "=?$charset?B?".base64_encode($subject)."?=";
110-
$header.="From: $from \nX-Priority: $priority\nCC: $cc\n";
111-
$header.="Mime-Version: 1.0\nContent-Type: text/plain; charset=$charset \n";
112-
$header.="Content-Transfer-Encoding: $ctencoding\nX-Mailer: Php/libMailv1.3\n";
113-
$message .= $mailtext;
110+
$header = "From: $from \nX-Priority: $priority\nCC:\n";
111+
$header .= "Mime-Version: 1.0\nContent-Type: text/plain; charset=$charset \n";
112+
$header .= "Content-Transfer-Encoding: $ctencoding\nX-Mailer: Php/libMailv1.3\n";
113+
$message = $mailtext;
114114
mail($to, $subject, $message, $header);
115115
}
116116

0 commit comments

Comments
 (0)