function sendmail_total($subject_total, $message_total) { $subject_total = $_POST['subject_total']; $message_total = $_POST['message_total']; $result = mysql_query("select email from " . TB_MEMBER . ""); require_once "includes/mimemail.inc.php"; $mail = new MIMEMAIL("HTML"); // иІбЇЇ HTML $mail->senderName = "admin"; // ™„иЌЉўй иІ $mail->senderMail = "" . WEB_EMAIL . ""; // Ќ’аЅ≈≈мЉўй иІ //$mail->bcc = $email; // иІбЇЇ bind carbon copy $mail->subject = $subject_total; // Ћ—«¢йЌЌ’аЅ≈≈м $mail->body = $message_total; // ¢йЌ§«“Ѕ Ћ√„Ќ HTML °здій // $mail->attachment[] = "path_to_file1/filename1"; // √–ЇЎµ”бЋєиІдњ≈мЈ’и®–бєЇ $mail->create(); // $mail->send("".$email.""); // аЅ≈≈мЉўй√—Ї //$mail->send("".$email.""); while ($dbarr = mysql_fetch_array($result)) { $user_mail = $dbarr['email']; $mail->send("" . $user_mail . ""); } if ($send) { echo "<center><b>" . _ADMIN_MEMBER_FUNCTION_SENDMAIL_ALL_OK . "</b></font></center>"; echo "<meta http-equiv='refresh' content='2;url=?name=admin&file=member&file=member_mail'>"; //exit() ; } else { $showmsg = "<center><b>" . _ADMIN_MEMBER_FUNCTION_SENDMAIL_ALL_NO . "</b></font>\n<input type='button' value='" . _ADMIN_MEMBER_MESSAGE_NO_DEL_GOBACK . "' onclick='history.back();'></center>"; showerror($showmsg); } }
function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address, $send_to_service = true, $email_text_adds = '') { $mail = new MIMEMAIL(MAILTYPE); $mail->senderName = $from_email_name; $mail->senderMail = $from_email_address; $mail->subject = $email_subject; $mail->body = $email_text; $mail->create(); $recipients = "{$to_name} <{$to_email_address}>"; $status = $mail->send($recipients); if ($send_to_service && $to_email_address != EMAIL_ADDRESS_SERVICE) { if ($email_text_adds != '') { $email_text = $email_text_adds . $email_text; } #dewa10022010 >> adds tep_mail(EMAIL_NAME_SERVICE, EMAIL_ADDRESS_SERVICE, $email_subject, $email_text, $from_email_name, $from_email_address, false); #dewa10022010 >> adds } if (!$status) { $status = $mail->error; } return $status; }