Revision 3018,
1.2 KB
checked in by amuller, 14 years ago
(diff) |
Ticket #1135 - Aplicando alterações do branches 2.0 no branches 2.2
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
Rev | Line | |
---|
[2] | 1 | <?php |
---|
[1040] | 2 | |
---|
[3018] | 3 | require_once '../../header.session.inc.php'; |
---|
| 4 | |
---|
[2] | 5 | $username = $_SESSION['phpgw_info']['expressomail']['user']['userid']; |
---|
| 6 | $password = $_SESSION['phpgw_info']['expressomail']['user']['passwd']; |
---|
| 7 | $imap_server = $_SESSION['phpgw_info']['expressomail']['email_server']['imapServer']; |
---|
| 8 | $imap_port = $_SESSION['phpgw_info']['expressomail']['email_server']['imapPort']; |
---|
| 9 | $msg_folder = $_GET['msg_folder']; |
---|
[205] | 10 | $msg_folder = mb_convert_encoding($msg_folder,"UTF7-IMAP", mb_detect_encoding($msg_folder, "UTF-8, ISO-8859-1", true)); |
---|
[27] | 11 | if ($_SESSION['phpgw_info']['expressomail']['email_server']['imapTLSEncryption'] == 'yes') |
---|
| 12 | { |
---|
| 13 | $imap_options = '/tls/novalidate-cert'; |
---|
| 14 | } |
---|
| 15 | else |
---|
| 16 | { |
---|
| 17 | $imap_options = '/notls/novalidate-cert'; |
---|
| 18 | } |
---|
[2] | 19 | |
---|
[205] | 20 | if (is_array($_SESSION['phpgw_info']['expressomail']['email_server'])) |
---|
| 21 | { |
---|
| 22 | $mb = imap_open("{".$imap_server.":".$imap_port.$imap_options."}".$msg_folder, $username, $password); |
---|
[2] | 23 | |
---|
[205] | 24 | if ($mb) |
---|
| 25 | { |
---|
| 26 | $msgno = $_GET['msg_num']; |
---|
| 27 | $embedded_part = $_GET['msg_part']; |
---|
| 28 | |
---|
| 29 | $embedded_body = imap_fetchbody($mb, $msgno, $embedded_part, FT_UID); |
---|
| 30 | |
---|
| 31 | header("Content-Type: image/jpeg"); |
---|
| 32 | header("Content-Disposition: inline"); |
---|
| 33 | echo imap_base64($embedded_body); |
---|
| 34 | } |
---|
| 35 | } |
---|
[1037] | 36 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.