- Timestamp:
- 05/29/12 14:05:15 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.3/expressoMail1_2/inc/class.imap_functions.inc.php
r6264 r6340 4056 4056 imap_createmailbox($mbox_stream,imap_utf7_encode("{".$imap_server."}".$folder)); 4057 4057 } 4058 4059 // string date ( string $format [, int $timestamp = time() ] ) 4060 // bool imap_append ( resource $imap_stream , string $mailbox , string $message [, string $options = NULL [, string $internal_date = NULL ]] ) 4061 // 'd-M-Y H:i:s O' 4062 4063 $return = array(); 4058 4064 if($timestamp){ 4059 4065 $tempDir = $_SESSION['phpgw_info']['server']['temp_dir']; … … 4067 4073 $return['append'] = imap_append($mbox_stream, "{".$imap_server.":".$imap_port."}".$folder, $source, "\\Seen"); 4068 4074 } 4075 4076 if (!empty($return['command'])) 4077 { 4078 list ($result, $msg) = explode(':',$return['command']); 4079 if (strtoupper($result) === 'NO') 4080 { 4081 $return['error'] = $msg; 4082 return $return; 4083 } 4084 } 4085 4069 4086 $status = imap_status($mbox_stream, "{".$this->imap_server.":".$this->imap_port."}".$folder, SA_UIDNEXT); 4070 4087 … … 4182 4199 $flags = explode("#@#@#@",$params['flags']); 4183 4200 $ids = explode("#@#@#@",$params['id']); 4184 $return = array(); 4201 $return = array(); 4202 $archived = array(); 4203 $error = array(); 4185 4204 4186 4205 foreach($sources as $index=>$src) … … 4190 4209 $source = $this->treat_base64_from_post($src); 4191 4210 $insert = $this->insert_email($source,$dest_folder,$timestamps[$index],$flags[$index]); 4192 if(!$insert['error']) 4193 $return[] = $ids[$index]; 4211 if($insert['error']) 4212 { 4213 $error[] = $ids[$index]; 4214 } 4215 else 4216 { 4217 $archived[] = $ids[$index]; 4218 } 4194 4219 } 4195 4220 } 4221 4222 if (!empty($error)) 4223 { 4224 $return['error'] = $error; 4225 } 4226 if (!empty($archived)) 4227 { 4228 $return['archived'] = $archived; 4229 } 4196 4230 4197 4231 return $return;
Note: See TracChangeset
for help on using the changeset viewer.