This blob has been accessed 418 times via Git panel.
- <?php
- ob_start();
- require_once("conf.php");
- ob_end_clean();
- session_start();
- if (!isset($_SESSION['logged_uid']) or !isset($_SESSION['logged_lvl']) or !isset($_SESSION['logged_key']) or ($_SESSION['logged_lvl'] != "subscriber")) {
- exit;
- }
- if (!isset($_POST['rcpt_mail']) or empty($_POST['rcpt_mail']) or !isset($_POST['rcpt_subj']) or empty($_POST['rcpt_subj']) or !isset($_POST['rcpt_date']) or empty($_POST['rcpt_date']) or !isset($_POST['rcpt_omid']) or empty($_POST['rcpt_omid']) or !isset($_POST['rcpt_omno']) or empty($_POST['rcpt_omno'])) {
- exit;
- }
- $rcpt_user = $_SESSION['logged_uid'];
- $rcpt_mail = strtolower(trim(strip_tags($_POST['rcpt_mail'])));
- $rcpt_subj = trim(strip_tags($_POST['rcpt_subj']));
- $rcpt_date = trim(strip_tags($_POST['rcpt_date']));
- $rcpt_part = md5(microtime(true));
- $rcpt_omid = trim($_POST['rcpt_omid']);
- $rcpt_omno = trim($_POST['rcpt_omno']);
- $rcpt_head = "From: $rcpt_user\nX-Mailer: Kartero/2.0 (PHP/" . phpversion() . ")\nMIME-Version: 1.0\nContent-Type: multipart/report;report-type=disposition-notification;boundary=\"$rcpt_part\"";
- $rcpt_body = "--$rcpt_part\nContent-Type: text/plain; charset=\"iso-8859-1\"\nContent-Transfer-Encoding: quoted-printable\n\nYour message\n\nTo: $rcpt_user\nSubject: $rcpt_subj\nDate: $rcpt_date\n\nWas displayed on " . date("D, j M Y H:i:s O (T)") . "\n\n--$rcpt_part\nContent-Type: message/disposition-notification\nContent-Transfer-Encoding: quoted-printable\n\nReporting-UA : " . $_SERVER['SERVER_NAME'] . " ; Kartero/2.0 (PHP/" . phpversion() . ")\nOriginal-Recipient : $rcpt_mail\nFinal-Recipient : rfc822;\nOriginal-Message-ID : $rcpt_omid\nDisposition: manual-action/MDN-sent-manually; displayed\n--$rcpt_part--";
- $rcpt_subj = "Read: $rcpt_subj";
- mail($rcpt_mail, $rcpt_subj, $rcpt_body, $rcpt_head, "-f $rcpt_user");
- $mbox = @imap_open($imap_host, $_SESSION['logged_uid'], $_SESSION['logged_key'], CL_EXPUNGE) or die(imap_last_error());
- imap_createmailbox($mbox,"{$imap_host}Sent");
- imap_append($mbox,"{$imap_host}Sent","To: $rcpt_mail\nSubject: $rcpt_subj\nDate: $rcpt_date\n$rcpt_head\n\n$rcpt_body\n");
- imap_setflag_full($mbox, $rcpt_omno, '\\Answered',ST_UID);
- //echo "<script>alert('Read receipt sent to $rcpt_mail');</script>";
- ?>