Changeset 583f1c8 in github for program/steps/mail/compose.inc
- Timestamp:
- Nov 8, 2005 3:18:56 PM (8 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- ecf7590
- Parents:
- b595c9f
- File:
-
- 1 edited
-
program/steps/mail/compose.inc (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
program/steps/mail/compose.inc
r10a69975 r583f1c8 51 51 'decode_headers' => TRUE, 52 52 'decode_bodies' => FALSE)); 53 53 54 54 $MESSAGE['subject'] = $IMAP->decode_header($MESSAGE['headers']->subject); 55 55 $MESSAGE['parts'] = $mmd->getMimeNumbers($MESSAGE['structure']); … … 57 57 if ($_GET['_reply_uid']) 58 58 { 59 $REPLY_MESSAGE = $MESSAGE;59 $REPLY_MESSAGE = &$MESSAGE; 60 60 $_SESSION['compose']['reply_uid'] = $_GET['_reply_uid']; 61 61 $_SESSION['compose']['reply_msgid'] = $REPLY_MESSAGE['headers']->messageID; 62 63 if ($_GET['_all']) 64 $REPLY_MESSAGE['reply_all'] = 1; 62 65 } 63 66 else … … 76 79 { 77 80 global $IMAP, $REPLY_MESSAGE, $DB; 81 static $sa_recipients = array(); 78 82 79 83 list($form_start, $form_end) = get_form_tags($attrib); … … 145 149 { 146 150 $fname = '_cc'; 147 //$header = 'cc';151 $header = 'cc'; 148 152 } 149 153 case 'bcc': … … 163 167 164 168 } 165 169 166 170 167 171 if ($fname && !empty($_POST[$fname])) … … 174 178 else if ($header=='to' && $REPLY_MESSAGE['headers']->from) 175 179 $fvalue = $IMAP->decode_header($REPLY_MESSAGE['headers']->from); 176 180 // add recipent of original message if reply to all 181 else if ($header=='cc' && $REPLY_MESSAGE['reply_all']) 182 { 183 if ($IMAP->decode_header($REPLY_MESSAGE['headers']->to)) 184 $fvalue .= $IMAP->decode_header($REPLY_MESSAGE['headers']->to); 185 186 if ($IMAP->decode_header($REPLY_MESSAGE['headers']->cc)) 187 { 188 if($fvalue) 189 $fvalue .= ', '; 190 191 $fvalue .= $IMAP->decode_header($REPLY_MESSAGE['headers']->cc); 192 } 193 } 194 177 195 // split recipients and put them back together in a unique way 178 $to_addresses = $IMAP->decode_address_list($fvalue); 179 $fvalue = ''; 180 foreach ($to_addresses as $addr_part) 181 $fvalue .= (strlen($fvalue) ? ', ':'').$addr_part['string']; 182 } 183 196 if (!empty($fvalue)) 197 { 198 $to_addresses = $IMAP->decode_address_list($fvalue); 199 $fvalue = ''; 200 foreach ($to_addresses as $addr_part) 201 { 202 if (!in_array($addr_part['mailto'], $sa_recipients)) 203 { 204 $fvalue .= (strlen($fvalue) ? ', ':'').$addr_part['string']; 205 $sa_recipients[] = $addr_part['mailto']; 206 } 207 } 208 } 209 } 210 184 211 185 212 if ($fname && $field_type)
Note: See TracChangeset
for help on using the changeset viewer.
