Revision 763,
1.1 KB
checked in by niltonneto, 15 years ago
(diff) |
Importação inicial do Expresso da Celepar
|
Line | |
---|
1 | <?php |
---|
2 | $username = $_SESSION['phpgw_info']['expressomail']['user']['userid']; |
---|
3 | $password = $_SESSION['phpgw_info']['expressomail']['user']['passwd']; |
---|
4 | $imap_server = $_SESSION['phpgw_info']['expressomail']['email_server']['imapServer']; |
---|
5 | $imap_port = $_SESSION['phpgw_info']['expressomail']['email_server']['imapPort']; |
---|
6 | $msg_folder = $_GET['msg_folder']; |
---|
7 | $msg_folder = mb_convert_encoding($msg_folder,"UTF7-IMAP", mb_detect_encoding($msg_folder, "UTF-8, ISO-8859-1", true)); |
---|
8 | if ($_SESSION['phpgw_info']['expressomail']['email_server']['imapTLSEncryption'] == 'yes') |
---|
9 | { |
---|
10 | $imap_options = '/tls/novalidate-cert'; |
---|
11 | } |
---|
12 | else |
---|
13 | { |
---|
14 | $imap_options = '/notls/novalidate-cert'; |
---|
15 | } |
---|
16 | |
---|
17 | if (is_array($_SESSION['phpgw_info']['expressomail']['email_server'])) |
---|
18 | { |
---|
19 | $mb = imap_open("{".$imap_server.":".$imap_port.$imap_options."}".$msg_folder, $username, $password); |
---|
20 | |
---|
21 | if ($mb) |
---|
22 | { |
---|
23 | $msgno = $_GET['msg_num']; |
---|
24 | $embedded_part = $_GET['msg_part']; |
---|
25 | |
---|
26 | $embedded_body = imap_fetchbody($mb, $msgno, $embedded_part, FT_UID); |
---|
27 | |
---|
28 | header("Content-Type: image/jpeg"); |
---|
29 | header("Content-Disposition: inline"); |
---|
30 | echo imap_base64($embedded_body); |
---|
31 | } |
---|
32 | } |
---|
33 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.