</tr> <?php if ($msgcount > 0) { $stl = 1; for ($mid = 1; $mid <= $msgcount; $mid++) { // Lee las cabecera $msg->getHeaders($mid); $style = isset($msg->header[$mid]['Recent']) && $msg->header[$mid]['Recent'] == 'N' || isset($msg->header[$mid]['Unseen']) && $msg->header[$mid]['Unseen'] == 'U' ? 'gray' : 'black'; $msg->getParts($mid); if (!isset($msg->header[$mid]['subject']) || empty($msg->header[$mid]['subject'])) { $msg->header[$mid]['subject'] = "<span style='font-style: italic;'>no subject provided</a>"; } echo " <tr class=listado{$stl}>", " <td class='msgitem'>\r\n\t<a href='javascript: window.open(" . '"' . "mensaje.php?mid={$mid}&pid={$msg->msg[$mid]['pid']}&passwdEmail={$passwdEmail}" . '"' . "," . '"' . "image" . '"' . ");\r\n ' target='image' style='color: {$style};' \r\n onClick='javascript:window.open(frame_padre.htm,lista1);'>{$msg->header[$mid]['subject']}</a>\r\n </td>\n" . " <td class='msgitem'>\n" . " ", isset($msg->header[$mid]['from_personal'][0]) && !empty($msg->header[$mid]['from_personal'][0]) ? '<span title="' . sup_tilde($msg->header[$mid]['from'][0]) . '">' . sup_tilde($msg->header[$mid]['from_personal'][0]) . "</span>" : sup_tilde($msg->header[$mid]['from'][0]), "\n", " </td>\n", " <td class='msgitem'>" . date('D d M, Y h:i:s', $msg->header[$mid]['udate']) . "</td>\n", " <td class='msgitem'>"; /*/Visualiza Inline Parts----------------------------------------------------------------------- if (isset($msg->msg[$mid]['in']['pid']) && count($msg->msg[$mid]['in']['pid']) > 0) { foreach ($msg->msg[$mid]['in']['pid'] as $i => $inid) { $fname = (isset($msg->msg[$mid]['in']['fname'][$i]))? $msg->msg[$mid]['in']['fname'][$i] : "No Disponible"; echo "<a href='attachement.php?mid=$mid&pid=".$msg->msg[$mid]['in']['pid'][$i]."' target='_blank'><img src='../img/ath1.jpg' width=18 height=18 alt='".$fname."' title='".$fname."'></a><br />\n"; } } */ // Visualiza attachments------------------------------------------------------------------------ if (isset($msg->msg[$mid]['at']['pid']) && count($msg->msg[$mid]['at']['pid']) > 0) { foreach ($msg->msg[$mid]['at']['pid'] as $i => $aid) { $fname = isset($msg->msg[$mid]['at']['fname'][$i]) ? $msg->msg[$mid]['at']['fname'][$i] : "No Disponible"; echo "<a href='attachement.php?mid={$mid}&pid=" . $msg->msg[$mid]['at']['pid'][$i] . "' target='_blank'><img src='../img/ath6.gif' width=18 height=18 alt='" . $fname . "' title='" . $fname . "'></a>";
<th> Adjuntos </th> </tr> <?php if ($msgcount > 0) { $stl = 1; for ($mid = 1; $mid <= $msgcount; $mid++) { // Lee las cabecera $msg->getHeaders($mid); $style = isset($msg->header[$mid]['Recent']) && $msg->header[$mid]['Recent'] == 'N' || isset($msg->header[$mid]['Unseen']) && $msg->header[$mid]['Unseen'] == 'U' ? 'gray' : 'black'; $msg->getParts($mid); if (!isset($msg->header[$mid]['subject']) || empty($msg->header[$mid]['subject'])) { $msg->header[$mid]['subject'] = "<span style='font-style: italic;'>no subject provided</a>"; } echo " <tr class=listado{$stl}>", " <td class='msgitem'>\r\n\t<a href='mensaje.php?mid={$mid}&pid=" . $msg->msg[$mid]['pid'] . "' target='image'>" . $msg->header[$mid]['Subject'] . "</a>\r\n </td>\n" . " <td class='msgitem'>\n" . " ", isset($msg->header[$mid]['from_personal'][0]) && !empty($msg->header[$mid]['from_personal'][0]) ? '<span title="' . sup_tilde($msg->header[$mid]['from'][0]) . '">' . sup_tilde($msg->header[$mid]['from_personal'][0]) . "</span>" : sup_tilde($msg->header[$mid]['from'][0]), "\n", " </td>\n", " <td class='msgitem'>" . date('D d M, Y h:i:s', $msg->header[$mid]['udate']) . "</td>\n", " <td class='msgitem'>"; /*/Visualiza Inline Parts----------------------------------------------------------------------- if (isset($msg->msg[$mid]['in']['pid']) && count($msg->msg[$mid]['in']['pid']) > 0) { foreach ($msg->msg[$mid]['in']['pid'] as $i => $inid) { $fname = (isset($msg->msg[$mid]['in']['fname'][$i]))? $msg->msg[$mid]['in']['fname'][$i] : "No Disponible"; echo "<a href='attachement.php?mid=$mid&pid=".$msg->msg[$mid]['in']['pid'][$i]."' target='_blank'><img src='../img/ath1.jpg' width=18 height=18 alt='".$fname."' title='".$fname."'></a><br />\n"; } } */ // Visualiza attachments------------------------------------------------------------------------ if (isset($msg->msg[$mid]['at']['pid']) && count($msg->msg[$mid]['at']['pid']) > 0) { foreach ($msg->msg[$mid]['at']['pid'] as $i => $aid) { $fname = isset($msg->msg[$mid]['at']['fname'][$i]) ? $msg->msg[$mid]['at']['fname'][$i] : "No Disponible"; echo "<a href='attachement.php?mid={$mid}&pid=" . $msg->msg[$mid]['at']['pid'][$i] . "' target='_blank'><img src='../img/ath6.gif' width=18 height=18 alt='" . $fname . "' title='" . $fname . "'></a>";
//---Encabezado de email------------------------------------------------------// //print_r ($msg->header[$mid] ); $contenidoEmail = $head; $contenidoEmail .= $body['message']; $headRadicado = "Fecha : " . $msg->header[$eMailMid]['Date'] . ""; $head = "De :" . sup_tilde($msg->header[$eMailMid]['from_personal'][0]) . " <" . sup_tilde($msg->header[$eMailMid]['from'][0]) . ">{$nl}"; $head .= "Asunto :" . $msg->header[$eMailMid]['Subject'] . "<BR>"; $iMail = 0; if (count($msg->header[$eMailMid]['to_personal']) >= 1) { foreach ($msg->header[$eMailMid]['to_personal'] as $key => $value) { if ($iMail == 0) { $head .= "Para :"; } else { $head .= ", "; } $head .= "" . sup_tilde($msg->header[$eMailMid]['to_personal'][$iMail]) . ""; $head .= "< " . $msg->header[$eMailMid]['to'][$iMail] . " >"; $iMail++; } } $head .= "{$nl} Enviado Desde Serv :" . $msg->header[$eMailMid]['sender_host'][0] . ""; //----------------------------------------------------------------------------// $reeContent = $head . "\r\n" . $body['message']; $head = $headRadicado . $head; if (!$reeAsunto) { $reeAsunto = $reeAsuntoO; } if ($reenviar == 'ok') { $headers .= "From: " . $_SESSION['pagina_web'] . "\r\n"; //dirección de respuesta, si queremos que sea distinta que la del remitente $headers .= "Reply-To: sspd@superservicios.gov.co\r\n";
// Lee las cabecera $msg->getHeaders($mid); $style = isset($msg->header[$mid]['Recent']) && $msg->header[$mid]['Recent'] == 'N' || isset($msg->header[$mid]['Unseen']) && $msg->header[$mid]['Unseen'] == 'U' ? 'gray' : 'black'; $msg->getParts($mid); if (!isset($msg->header[$mid]['subject']) || empty($msg->header[$mid]['subject'])) { $msg->header[$mid]['subject'] = "<span style='font-style: italic;'>no subject provided</a>"; } $eMailAsunto = "{$msg->header[$mid]['subject']}"; $eMailRemitente = "{$msg->header[$mid]['from'][0]}"; $eMailNombreRemitente = "{$msg->msg[$mid]['from_personal'][0]}"; $eMailFecha = date('Y/mm/dd h:m:s', $msg->msg[$mid]['udate']); $_SESSION['eMailFecha'] = $eMailFecha; $_SESSION['eMailAsunto'] = $eMailAsunto; $_SESSION['eMailRemitente'] = $eMailRemitente; $_SESSION['eMailNombreRemitente'] = $eMailNombreRemitente; echo "<span class=titulo1> - Asunto :</span> <a href='javascript: window.open(" . '"' . "attachement.php?mid={$mid}&pid={$msg->msg[$mid]['pid']}" . '"' . "," . '"' . "image" . '"' . ");\r\n window.open(" . '"' . "emailRadicar.php?mid={$mid}&pid={$msg->msg[$mid]['pid']}" . '"' . "," . '"' . "lista1" . '"' . "); ' target='image' style='color: {$style};' \r\n onClick='javascript:window.open(frame_padre.htm,lista1);'>{$emailAsunto}</a>\r\n <span class=titulo1> - Remitente :</span> " . " ", isset($msg->header[$mid]['from_personal'][0]) && !empty($msg->header[$mid]['from_personal'][0]) ? '<span title="' . sup_tilde($msg->header[$mid]['from'][0]) . '">' . sup_tilde($msg->header[$mid]['from_personal'][0]) . "</span>" : sup_tilde($msg->header[$mid]['from'][0]), "\n", " <span class=titulo1> - Fecha :</span>" . date('Y/mm/dd h:i:s', $msg->header[$mid]['udate']) . "\n", " <span class=titulo1> - Adjuntos :</span> "; /*/Visualiza Inline Parts----------------------------------------------------------------------- if (isset($msg->msg[$mid]['in']['pid']) && count($msg->msg[$mid]['in']['pid']) > 0) { foreach ($msg->msg[$mid]['in']['pid'] as $i => $inid) { $fname = (isset($msg->msg[$mid]['in']['fname'][$i]))? $msg->msg[$mid]['in']['fname'][$i] : "No Disponible"; echo "<a href='attachement.php?mid=$mid&pid=".$msg->msg[$mid]['in']['pid'][$i]."' target='_blank'><img src='../img/ath1.jpg' width=18 height=18 alt='".$fname."' title='".$fname."'></a><br />\n"; } } */ // Visualiza attachments------------------------------------------------------------------------ if (isset($msg->msg[$mid]['at']['pid']) && count($msg->msg[$mid]['at']['pid']) > 0) { foreach ($msg->msg[$mid]['at']['pid'] as $i => $aid) { $fname = isset($msg->msg[$mid]['at']['fname'][$i]) ? $msg->msg[$mid]['at']['fname'][$i] : "No Disponible"; echo "<a href='attachement.php?mid={$mid}&pid=" . $msg->msg[$mid]['at']['pid'][$i] . "' target='_blank' border=0><img src='../img/ath6.gif' width=12 height=12 alt='" . $fname . "' title='" . $fname . "' border=0></a>\n";
<?php if ($msgcount > 0) { for ($mid = 1; $mid <= $msgcount; $mid++) { // Get the headers $msg->getHeaders($mid); $style = isset($msg->header[$mid]['Recent']) && $msg->header[$mid]['Recent'] == 'N' || isset($msg->header[$mid]['Unseen']) && $msg->header[$mid]['Unseen'] == 'U' ? 'gray' : 'black'; // Grab inline and attachment parts relevant to top level parts. // See the docs for the $msg property for more information: // http://www.smilingsouls.net/index.php?content=Mail_IMAP/msg $msg->getParts($mid); if (!isset($msg->header[$mid]['subject']) || empty($msg->header[$mid]['subject'])) { $msg->header[$mid]['subject'] = "<span style='font-style: italic;'>no subject provided</a>"; } //echo var_dump($msg->header[$mid]); echo " <tr>\n", " <td class='msgitem'><a href='message_viewer.php?mid={$mid}&pid={$msg->msg[$mid]['pid']}' target='_blank' style='color: {$style};'>{$msg->header[$mid]['subject']}</a></td>\n", " <td class='msgitem'>\n", " ", isset($msg->header[$mid]['from_personal'][0]) && !empty($msg->header[$mid]['from_personal'][0]) ? '<span title="' . sup_tilde($msg->header[$mid]['from'][0]) . '">' . sup_tilde($msg->header[$mid]['from_personal'][0]) . "</span>" : sup_tilde($msg->header[$mid]['from'][0]), "\n", " </td>\n", " <td class='msgitem'>" . date('D d M, Y h:i:s', $msg->header[$mid]['udate']) . "</td>\n", " <td class='msgitem'>" . "<a href='' >----------</a>" . "</td>\n", " </tr>\n", " <tr>\n", " <td colspan='4' class='msgattach'>\n"; // Show inline parts first if (isset($msg->msg[$mid]['in']['pid']) && count($msg->msg[$mid]['in']['pid']) > 0) { foreach ($msg->msg[$mid]['in']['pid'] as $i => $inid) { $fname = isset($msg->msg[$mid]['in']['fname'][$i]) ? $msg->msg[$mid]['in']['fname'][$i] : NULL; echo " Inline part: <a href='message_viewer.php?mid={$mid}&pid=" . $msg->msg[$mid]['in']['pid'][$i] . "' target='_blank'>" . $fname . " " . $msg->msg[$mid]['in']['ftype'][$i] . " " . $msg->convertBytes($msg->msg[$mid]['in']['fsize'][$i]) . "</a><br />\n"; } } // Now the attachments if (isset($msg->msg[$mid]['at']['pid']) && count($msg->msg[$mid]['at']['pid']) > 0) { foreach ($msg->msg[$mid]['at']['pid'] as $i => $aid) { $fname = isset($msg->msg[$mid]['at']['fname'][$i]) ? $msg->msg[$mid]['at']['fname'][$i] : NULL; echo " Attachment: <a href='guardarAttachement.php?mid={$mid}&pid=" . $msg->msg[$mid]['at']['pid'][$i] . "' target='_blank'>" . $fname . " " . $msg->msg[$mid]['at']['ftype'][$i] . " " . $msg->convertBytes($msg->msg[$mid]['at']['fsize'][$i]) . "</a><br />\n"; } } echo " </td>\n", "</tr>\n";
$eMailPid = $_SESSION['eMailPid']; $body = $msg->getBody($eMailMid, $eMailPid); //lectura cabeceras---- $msg->getHeaders($eMailMid); error_reporting(7); $eMailRemitente = $_SESSION['eMailRemitente']; $eMailNombreRemitente = $_SESSION['eMailNombreRemitente']; if ($body['ftype'] == "text/html") { $nl = "</br>"; } else { $nl = "\n"; } $headRadicado = "\r\n\t<TABLE width=\"90%\" cellspacing=\"0\" border=\"0\" cellpadding=\"0\" >\r\n <tr><td width=55%> </td>\r\n <td border=1>\r\n\t<FONT face='free3of9,FREE3OF9, FREE3OF9X' SIZE=12>*{$nurad}*</FONT><br>\r\n\tRadicado No. {$nurad}<br>\r\n\tFecha : " . $msg->header[$eMailMid]['Date'] . "<br>"; $headRadicado .= "<FONT SIZE=2>" . $_SESSION['entidad_largo'] . "<br>"; $headRadicado .= "Consulte su Tramite en " . $_SESSION['pagina_web'] . "<br></FONT>\r\n </td></tr>\r\n </TABLE>\r\n"; $remitente = sup_tilde($msg->header[$eMailMid]['from_personal'][0]) . " <" . sup_tilde($msg->header[$eMailMid]['from'][0]) . ">"; $head = "De :{$remitente}<br>"; $head .= "Asunto :" . $msg->header[$eMailMid]['Subject'] . "<br>"; $iMailMid = 0; $iMail = 0; foreach ($msg->header[$eMailMid]['to_personal'] as $key => $value) { if ($iMail == 0) { $head .= "Para :"; } else { $head .= ", "; } $head .= "" . $msg->header[$eMailMid]['to_personal'][$iMail] . ""; $head .= "< " . $msg->header[$eMailMid]['to'][$iMail] . " >"; $iMail++; } error_reporting(7);