- Timestamp:
- 12/07/10 09:18:31 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php
r3564 r3566 397 397 $head1 = explode(":",$head); 398 398 if ( (strtoupper($head1[0]) == "TO") || 399 (strtoupper($head1[0]) == "FROM") || 400 (strtoupper($head1[0]) == "SUBJECT") || 401 (strtoupper($head1[0]) == "DATE") || 402 (strtoupper($head1[0]) == "CONTENT-TYPE")) { 403 404 if(strtoupper($head1[0]) == "CONTENT-TYPE"){ 405 $head = str_replace("multipart/mixed","text/html",$head); 406 } 407 $header .= $head."\n"; 408 } 399 (strtoupper($head1[0]) == "FROM") || 400 (strtoupper($head1[0]) == "SUBJECT") || 401 (strtoupper($head1[0]) == "DATE") ) 402 $header .= $head."\r\n"; 409 403 } 410 404 … … 414 408 para que o método decodeBody do expresso possa trazer tudo certinho*/ 415 409 410 $all_body_type = strtolower($msg->file_type[$params["msg_num"]][0]); 411 $all_body_encoding = $msg->encoding[$params["msg_num"]][0]; 412 $all_body_charset = $msg->charset[$params["msg_num"]][0]; 413 414 if($all_body_type=='multipart/alternative') { 415 if(strtolower($msg->file_type[$params["msg_num"]][2]=='text/html') && 416 $msg->pid[$params["msg_num"]][2] == '1.2') { 417 $body_part_to_show = '1.2'; 418 $all_body_type = strtolower($msg->file_type[$params["msg_num"]][2]); 419 $all_body_encoding = $msg->encoding[$params["msg_num"]][2]; 420 $all_body_charset = $msg->charset[$params["msg_num"]][2]; 421 } 422 else { 423 $body_part_to_show = '1.1'; 424 $all_body_type = strtolower($msg->file_type[$params["msg_num"]][1]); 425 $all_body_encoding = $msg->encoding[$params["msg_num"]][1]; 426 $all_body_charset = $msg->charset[$params["msg_num"]][1]; 427 } 428 } 429 else 430 $body_part_to_show = '1'; 431 416 432 $status = imap_append($this->mbox, 417 433 "{".$this->imap_server.":".$this->imap_port.$this->imap_options."}".$params["folder"], 418 434 $header. 435 "Content-Type: ".$all_body_type."; charset = \"".$all_body_charset."\"". 436 "\r\n". 437 "Content-Transfer-Encoding: ".$all_body_encoding. 438 "\r\n". 419 439 "\r\n". 420 440 str_replace("\n","\r\n",$this->decodeBody( 421 imap_fetchbody($this->mbox,imap_msgno($this->mbox, $params["msg_num"]), "1"),422 $ msg->encoding[$params["msg_num"]][0], $msg->charset[$params["msg_num"]][0]441 imap_fetchbody($this->mbox,imap_msgno($this->mbox, $params["msg_num"]),$body_part_to_show), 442 $all_body_encoding, $all_body_charset 423 443 ) 424 444 ), "\\Seen"); //Append do novo email, só com header e conteúdo sem anexos.
Note: See TracChangeset
for help on using the changeset viewer.