Esempio n. 1
0
 function send_email($To, $Subject, $Body)
 {
     global $Charset;
     global $Sender_Name, $Sender_email;
     global $mail_date;
     $Subject = quote_printable($Subject, $Charset);
     $Headers = "From: {$Sender_Name} <{$Sender_email}> \r\n";
     $Headers .= "X-Sender: <{$Sender_email}> \r\n";
     $Headers .= "X-Mailer: PHP/" . phpversion() . " \r\n";
     $Headers .= "Return-Path: <{$Sender_email}> \r\n";
     $Headers .= "Date: {$mail_date} \r\n";
     $Headers .= "Mime-Version: 1.0 \r\n";
     $Headers .= "Content-Type: text/plain; charset={$Charset} \r\n";
     $Headers .= "Content-Transfer-Encoding: 8bit \r\n";
     return @mail($To, $Subject, stripslashes($Body), $Headers);
 }
function send_dob_email($dob_name, $dob_email, $dob_subject, $DOB_String)
{
    global $Charset;
    global $Mail_Greeting, $Chat_URL;
    global $Sender_Name, $Sender_Name1, $Sender_email;
    global $mail_date, $dob1_subject, $dob_birthday, $eol;
    $dob_subject = quote_printable($dob_subject, $Charset);
    $dob_body = $DOB_String . $eol;
    $dob_body .= $dob1_subject . $eol . $dob_birthday . $eol . $eol . $Mail_Greeting . $eol . $Sender_Name1 . $eol . $Chat_URL;
    $dob_body = stripslashes($dob_body);
    $dob_headers = "From: {$Sender_Name} <{$Sender_email}>" . $eol;
    $dob_headers .= "Bcc: {$Sender_email}" . $eol;
    $dob_headers .= "X-Sender: {$Sender_email}" . $eol;
    $dob_headers .= "X-Mailer: PHP/" . PHP_VERSION . $eol;
    $dob_headers .= "Return-Path: {$Sender_email}" . $eol;
    $dob_headers .= "Date: {$mail_date}" . $eol;
    $dob_headers .= "Mime-Version: 1.0" . $eol;
    $dob_headers .= "Content-Type: text/plain; charset={$Charset}; format=flowed" . $eol;
    $dob_headers .= "Content-Transfer-Encoding: 8bit" . $eol;
    return @mail($dob_name . " <" . $dob_email . ">", $dob_subject, $dob_body, $dob_headers);
}
Esempio n. 3
0
         } else {
             $usegrav = "no";
         }
         if ($SHOW_BDAY) {
             $shwbday = "yes";
         } else {
             $shwbday = "no";
         }
         if ($SHOW_AGE) {
             $shwage = "yes";
         } else {
             $shwage = "no";
         }
         $emailMessage = $pmc_username . " has just changed important account info for " . (C_CHAT_NAME != "" ? C_CHAT_NAME : APP_NAME) . " at " . $Chat_URL . " :" . $eol . $eol . "Here is the updated account info for " . $pmc_username . ":" . $eol . "----------------------------------------------" . $eol . "New Username: "******"New Password: "******"----------------------------------------------" . $eol . $eol . "Secret question: " . $secret_questiona . $eol . "Secret answer: " . $SECRET_ANSWER . $eol . "Email: " . $EMAIL . $eol . "Display email address on public info: " . $shweml . ($FIRSTNAME ? $eol . "First name: " . $FIRSTNAME : "") . ($LASTNAME ? $eol . "Last name: " . $LASTNAME : "") . ($BIRTHDAY != "" ? $eol . "Date of birth: " . $BIRTHDAY : "") . ($BIRTHDAY != "" ? $eol . "Display birthday on public info: " . $shwbday : "") . ($BIRTHDAY != "" ? $eol . "Display age on public info: " . $shwage : "") . $eol . "Gender: " . $sex . ($COUNTRY ? $eol . "Country: " . $COUNTRY : "") . ($WEBSITE ? $eol . "WWW: " . $WEBSITE : "") . ($SLANG ? $eol . "Language: " . $SLANG : "") . ($FAVLINK ? $eol . "Favorite link 1: " . $FAVLINK : "") . ($FAVLINK1 ? $eol . "Favorite link 2: " . $FAVLINK1 : "") . ($DESCRIPTION ? $eol . "Description: " . $DESCRIPTION : "") . ($PICTURE ? $eol . "Picture: " . $PICTURE : "") . $eol . "Color name/text: " . ($C ? $C : "Not selected") . " (" . (COLOR_NAMES ? "Enabled" : "Disabled") . ")" . $eol . "Open popups on private message: " . $allpopup . ($usegrav ? $eol . "Use the Gravatar: " . $usegrav . " (" . (ALLOW_GRAVATARS ? "Enabled" : "Disabled") . ")" : "") . $eol . "----------------------------------------------" . $eol . "Prefered language: " . $L . $eol . "Updated on: {$dt} {$ti}" . $eol . "IP address: {$IP} (" . gethostbyaddr($IP) . ")" . $eol . "----------------------------------------------" . $eol . $eol . "Please note that some data should be disabled from this copy for privacy concerns!" . $eol . "Save this email for your further reference." . $eol . "Enjoy!";
         $Subject = "Modified user - " . $U . " - Updated details for [" . (C_CHAT_NAME != "" ? C_CHAT_NAME : APP_NAME) . "]";
         $Subject = quote_printable($Subject, $Charset);
         $emailMessage = stripslashes($emailMessage);
         @mail($Sender_Name . " <" . $Sender_email . ">", $Subject, $emailMessage, $Headers);
     }
 }
 // End of patch to send an email to the User and/or admin after registration.
 if ($pmc_username != $U) {
     $pmc_username = $U;
 }
 if ($pmc_password != $prev_PASSWORD && (!isset($RemMe) || isset($RemMe) && $PWD_hash != $RemMe && $prev_PASSWORD != $RemMe)) {
     $pmc_password = $prev_PASSWORD;
     if (isset($RemMe) && $PWD_hash != $RemMe && $prev_PASSWORD != $RemMe) {
         setcookie("CookieHash", $PWD_Hash, time() + 60 * 60 * 24 * 365);
     }
     // cookie expires in one year
 }
 function send_email_admin($To, $Subject, $Body, $pmc_email, $BCC)
 {
     global $Charset;
     global $Sender_Name, $Sender_Name1, $Sender_email, $Chat_URL, $Ccopy, $pmc_username, $Mail_Greeting;
     global $mail_date, $eol, $bcc_list;
     $to_list = "";
     if (isset($BCC) && $BCC) {
         $bcc_list = $To;
     } else {
         $to_list = $To;
     }
     if ($pmc_email != $Sender_email) {
         $bcc_list .= " <{$Sender_email}>";
     }
     if ($Sender_Name != "") {
         $Sender_Name = quote_printable($Sender_Name, $Charset);
     }
     // Create a boundary so we know where to look for
     // the start of the data
     $boundary = uniqid("HTMLEMAIL");
     $Subject = quote_printable($Subject, $Charset);
     $Body = stripslashes($Body);
     $Headers = "From: {$Sender_Name} <{$Sender_email}>" . $eol;
     if ($Ccopy && ${pmc_email}) {
         $Headers .= "Cc: {$pmc_username} <{$pmc_email}>" . $eol;
     }
     if ($bcc_list != "") {
         $Headers .= "Bcc: " . $bcc_list . $eol;
     }
     if (${pmc_email}) {
         $Headers .= "Reply-To: {$pmc_username} <{$pmc_email}>" . $eol;
     }
     $Headers .= "X-Sender: {$Sender_email}" . $eol;
     $Headers .= "X-Mailer: PHP/" . PHP_VERSION . $eol;
     $Headers .= "Return-Path: {$Sender_email}" . $eol;
     $Headers .= "Date: {$mail_date}" . $eol;
     $Headers .= "Mime-Version: 1.0" . $eol;
     if (!stristr(PHP_OS, 'win')) {
         // First we be nice and send a non-html version of our email
         $Headers .= "Content-Type: multipart/alternative; boundary = " . $boundary . $eol . $eol;
         $Headers .= "This is a MIME encoded message." . $eol . $eol;
         $Headers .= "--" . $boundary . $eol;
         $Headers .= "Content-Type: text/plain; charset={$Charset}; format=flowed" . $eol;
         #		$Headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
         #		$Headers .= chunk_split(strip_tags($Body));
         $Headers .= "Content-Transfer-Encoding: " . (function_exists("base64_encode") ? "base64" : "8bit") . $eol . $eol;
         $Headers .= function_exists("base64_encode") ? chunk_split(base64_encode(strip_tags($Body))) : chunk_split(strip_tags($Body));
         // Now we attach the HTML version
         $Headers .= "--" . $boundary . $eol;
         $Headers .= "Content-Type: text/html; charset={$Charset}; format=flowed" . $eol;
         #		$Headers .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
         #		$Headers .= chunk_split(str_replace($eol,"<br />",$Body));
         $Headers .= "Content-Transfer-Encoding: " . (function_exists("base64_encode") ? "base64" : "8bit") . $eol . $eol;
         $Headers .= function_exists("base64_encode") ? chunk_split(base64_encode(str_replace($eol, "<br />", $Body))) : chunk_split(str_replace($eol, "<br />", $Body));
         // And then send the email ....
         return @mail($to_list, $Subject, "", $Headers);
     } else {
         $Headers .= "Content-Type: text/plain; charset={$Charset}; format=flowed" . $eol;
         $Headers .= "Content-Transfer-Encoding: 8bit" . $eol . $eol;
         $Body = chunk_split($Body);
         // And then send the email ....
         return @mail($to_list, $Subject, $Body, $Headers);
     }
 }