Changeset 1120 in subversion
- Timestamp:
- Feb 19, 2008 6:59:38 PM (5 years ago)
- Location:
- trunk/roundcubemail
- Files:
-
- 3 edited
-
CHANGELOG (modified) (1 diff)
-
program/js/app.js (modified) (1 diff)
-
program/steps/mail/sendmail.inc (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/CHANGELOG
r1119 r1120 5 5 ---------- 6 6 - Localize folder name in page title (#1484785) 7 - Allow to send mail with BCC recipients only 7 8 8 9 2008/02/12 (estadtherr) -
trunk/roundcubemail/program/js/app.js
r1098 r1120 1696 1696 // check input fields 1697 1697 var input_to = rcube_find_object('_to'); 1698 var input_cc = rcube_find_object('_cc'); 1699 var input_bcc = rcube_find_object('_bcc'); 1698 1700 var input_subject = rcube_find_object('_subject'); 1699 1701 var input_message = rcube_find_object('_message'); 1700 1702 1701 1703 // check for empty recipient 1702 if (input_to && !rcube_check_email(input_to.value.replace(/^\s+/, '').replace(/[\s,;]+$/, ''), true)) 1704 var recipients = input_to.value ? input_to.value : (input_cc.value ? input_cc.value : input_bcc.value); 1705 if (!rcube_check_email(recipients.replace(/^\s+/, '').replace(/[\s,;]+$/, ''), true)) 1703 1706 { 1704 1707 alert(this.get_label('norecipientwarning')); -
trunk/roundcubemail/program/steps/mail/sendmail.inc
r1078 r1120 11 11 | PURPOSE: | 12 12 | Compose a new mail message with all headers and attachments | 13 | and send it using IlohaMail's SMTP methods or with PHP mail() |13 | and send it using the PEAR::Net_SMTP class or with PHP mail() | 14 14 | | 15 15 +-----------------------------------------------------------------------+ … … 130 130 131 131 132 if (!$savedraft && empty($_POST['_to']) && empty($_POST['_ subject']) && $_POST['_message'])132 if (!$savedraft && empty($_POST['_to']) && empty($_POST['_cc']) && empty($_POST['_bcc']) && empty($_POST['_subject']) && $_POST['_message']) 133 133 { 134 134 $OUTPUT->show_message("sendingfailed", 'error'); … … 147 147 // replace new lines and strip ending ', ' 148 148 $mailto = preg_replace($mailto_regexp, $mailto_replace, get_input_value('_to', RCUBE_INPUT_POST, TRUE, $message_charset)); 149 150 // decode address strings 151 $to_address_arr = $IMAP->decode_address_list($mailto); 149 $mailcc = preg_replace($mailto_regexp, $mailto_replace, get_input_value('_cc', RCUBE_INPUT_POST, TRUE, $message_charset)); 150 $mailbcc = preg_replace($mailto_regexp, $mailto_replace, get_input_value('_bcc', RCUBE_INPUT_POST, TRUE, $message_charset)); 151 152 if (empty($mailto) && !empty($mailcc)) { 153 $mailto = $mailcc; 154 $mailcc = null; 155 } 156 else if (empty($mailto)) 157 $mailto = 'undisclosed-recipients:;'; 158 159 // get sender name and address 152 160 $identity_arr = rcmail_get_identity(get_input_value('_from', RCUBE_INPUT_POST)); 153 154 161 $from = $identity_arr['mailto']; 155 $first_to = is_array($to_address_arr[0]) ? $to_address_arr[0]['mailto'] : $mailto;156 162 157 163 if (empty($identity_arr['string'])) … … 164 170 165 171 // additional recipients 166 if (!empty($ _POST['_cc']))167 $headers['Cc'] = preg_replace($mailto_regexp, $mailto_replace, get_input_value('_cc', RCUBE_INPUT_POST, TRUE, $message_charset));168 169 if (!empty($ _POST['_bcc']))170 $headers['Bcc'] = preg_replace($mailto_regexp, $mailto_replace, get_input_value('_bcc', RCUBE_INPUT_POST, TRUE, $message_charset));172 if (!empty($mailcc)) 173 $headers['Cc'] = $mailcc; 174 175 if (!empty($mailbcc)) 176 $headers['Bcc'] = $mailbcc; 171 177 172 178 if (!empty($identity_arr['bcc']))
Note: See TracChangeset
for help on using the changeset viewer.
