- Timestamp:
- 02/28/11 16:33:32 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/expressoMail1_2/inc/class.imap_functions.inc.php
r3803 r3831 235 235 $to = $header->to; 236 236 $head_array['to'] = array(); 237 $tmp = ( isset( $to[0]->personal ) ) ? imap_mime_header_decode($to[0]->personal) : NULL; 238 $head_array['to']['name'] = ( isset( $tmp[0]->text ) ) ? $this->decode_string($this->decode_string($tmp[0]->text)) : NULL; 239 $head_array['to']['email'] = ( isset( $to[0]->mailbox ) ) ? ( $this->decode_string($to[0]->mailbox) . "@" . ( ( isset( $to[0]->host ) ) ? $to[0]->host : '' ) ) : NULL; 240 if(!$head_array['to']['name']) 241 $head_array['to']['name'] = $head_array['to']['email']; 237 if($to[1] && $to[1]->host == ".SYNTAX-ERROR.") { //E-mails que não possuem o campo "para", vêm com o recipiente preenchido, porém com um recipiente a mais alegando erro de sintaxe. 238 $head_array['to']['name'] = $head_array['to']['email'] = NULL; 239 } 240 else { 241 $tmp = ( isset( $to[0]->personal ) ) ? imap_mime_header_decode($to[0]->personal) : NULL; 242 $head_array['to']['name'] = ( isset( $tmp[0]->text ) ) ? $this->decode_string($this->decode_string($tmp[0]->text)) : NULL; 243 $head_array['to']['email'] = ( isset( $to[0]->mailbox ) ) ? ( $this->decode_string($to[0]->mailbox) . "@" . ( ( isset( $to[0]->host ) ) ? $to[0]->host : '' ) ) : NULL; 244 if(!$head_array['to']['name']) 245 $head_array['to']['name'] = $head_array['to']['email']; 246 } 242 247 $cc = $header->cc; 248 $cco = $header->bcc; 243 249 if ( ($cc) && (!$head_array['to']['name']) ){ 244 250 $head_array['to']['name'] = ( isset( $cc[0]->personal ) ) ? $this->decode_string($cc[0]->personal) : NULL; 245 251 $head_array['to']['email'] = $this->decode_string($cc[0]->mailbox) . "@" . $cc[0]->host; 252 if(!$head_array['to']['name']) 253 $head_array['to']['name'] = $head_array['from']['email']; 254 } 255 else if ( ($cco) && (!$head_array['to']['name']) ){ 256 $head_array['to']['name'] = ( isset( $cco[0]->personal ) ) ? $this->decode_string($cco[0]->personal) : NULL; 257 $head_array['to']['email'] = $this->decode_string($cco[0]->mailbox) . "@" . $cco[0]->host; 246 258 if(!$head_array['to']['name']) 247 259 $head_array['to']['name'] = $head_array['from']['email'];
Note: See TracChangeset
for help on using the changeset viewer.