Changeset 3468 in subversion
- Timestamp:
- Apr 2, 2010 9:53:39 AM (3 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 5 edited
-
CHANGELOG (modified) (1 diff)
-
config/main.inc.php.dist (modified) (1 diff)
-
program/localization/en_US/messages.inc (modified) (1 diff)
-
program/localization/pl_PL/messages.inc (modified) (1 diff)
-
program/steps/mail/sendmail.inc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r3435 r3468 2 2 =========================== 3 3 4 - Added optional (max_recipients) support to restrict total number of recipients per message (#1484542) 4 5 - Re-organize editor buttons, add blockquote and search buttons 5 6 - Make possible to write inside or after a quoted html message (#1485476) -
trunk/roundcubemail/config/main.inc.php.dist
r3415 r3468 180 180 // How many seconds must pass between emails sent by a user 181 181 $rcmail_config['sendmail_delay'] = 0; 182 183 // Maximum number of recipients per message. Default: 0 (no limit) 184 $rcmail_config['max_recipients'] = 0; 182 185 183 186 // add this user-agent to message headers when sending -
trunk/roundcubemail/program/localization/en_US/messages.inc
r3458 r3468 112 112 $messages['smtperror'] = 'SMTP Error: $msg'; 113 113 $messages['emailformaterror'] = 'Incorrect e-mail address: $email'; 114 $messages['toomanyrecipients'] = 'Too many recipients. Reduce the number of recipients to $max.'; 114 115 115 116 ?> -
trunk/roundcubemail/program/localization/pl_PL/messages.inc
r3408 r3468 155 155 $messages['notuploadedwarning'] = 'Nie wszystkie zaÅÄ 156 156 czniki zostaÅy pobrane. Poczekaj lub anuluj pobieranie.'; 157 $messages['toomanyrecipients'] = 'Zbyt wielu odbiorców. Zmniejsz ich liczbÄ do $max.'; 157 158 158 159 ?> -
trunk/roundcubemail/program/steps/mail/sendmail.inc
r3446 r3468 150 150 } 151 151 152 // parse email address input 153 function rcmail_email_input_format($mailto )154 { 155 global $EMAIL_FORMAT_ERROR ;152 // parse email address input (and count addresses) 153 function rcmail_email_input_format($mailto, $count=false) 154 { 155 global $EMAIL_FORMAT_ERROR, $RECIPIENT_COUNT; 156 156 157 157 $regexp = array('/[,;]\s*[\r\n]+/', '/[\r\n]+/', '/[,;]\s*$/m', '/;/', '/(\S{1})(<\S+@\S+>)/U'); … … 198 198 } 199 199 200 if ($count) { 201 $RECIPIENT_COUNT += count($result); 202 } 203 200 204 return implode(', ', $result); 201 205 } … … 213 217 214 218 $EMAIL_FORMAT_ERROR = NULL; 215 216 $mailto = rcmail_email_input_format(get_input_value('_to', RCUBE_INPUT_POST, TRUE, $message_charset)); 217 $mailcc = rcmail_email_input_format(get_input_value('_cc', RCUBE_INPUT_POST, TRUE, $message_charset)); 218 $mailbcc = rcmail_email_input_format(get_input_value('_bcc', RCUBE_INPUT_POST, TRUE, $message_charset)); 219 $RECIPIENT_COUNT = 0; 220 221 $mailto = rcmail_email_input_format(get_input_value('_to', RCUBE_INPUT_POST, TRUE, $message_charset), true); 222 $mailcc = rcmail_email_input_format(get_input_value('_cc', RCUBE_INPUT_POST, TRUE, $message_charset), true); 223 $mailbcc = rcmail_email_input_format(get_input_value('_bcc', RCUBE_INPUT_POST, TRUE, $message_charset), true); 219 224 220 225 if ($EMAIL_FORMAT_ERROR) { … … 298 303 $headers['Bcc'] = $mailbcc; 299 304 300 if (!empty($identity_arr['bcc'])) 305 if (!empty($identity_arr['bcc'])) { 301 306 $headers['Bcc'] = ($headers['Bcc'] ? $headers['Bcc'].', ' : '') . $identity_arr['bcc']; 307 $RECIPIENT_COUNT ++; 308 } 309 310 if (($max_recipients = (int) $RCMAIL->config->get('max_recipients')) > 0) { 311 if ($RECIPIENT_COUNT > $max_recipients) { 312 $OUTPUT->show_message('toomanyrecipients', 'error', array('max' => $max_recipients)); 313 $OUTPUT->send('iframe'); 314 } 315 } 302 316 303 317 // add subject … … 360 374 361 375 362 $isHtmlVal = strtolower(get_input_value('_is_html', RCUBE_INPUT_POST)); 363 $isHtml = ($isHtmlVal == "1"); 376 $isHtml = (bool) get_input_value('_is_html', RCUBE_INPUT_POST); 364 377 365 378 // fetch message body
Note: See TracChangeset
for help on using the changeset viewer.
