summaryrefslogtreecommitdiff
path: root/program/js
diff options
context:
space:
mode:
Diffstat (limited to 'program/js')
-rw-r--r--program/js/app.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/program/js/app.js b/program/js/app.js
index eef6d28b3..9419d776d 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1695,11 +1695,14 @@ function rcube_webmail()
{
// check input fields
var input_to = rcube_find_object('_to');
+ var input_cc = rcube_find_object('_cc');
+ var input_bcc = rcube_find_object('_bcc');
var input_subject = rcube_find_object('_subject');
var input_message = rcube_find_object('_message');
// check for empty recipient
- if (input_to && !rcube_check_email(input_to.value.replace(/^\s+/, '').replace(/[\s,;]+$/, ''), true))
+ var recipients = input_to.value ? input_to.value : (input_cc.value ? input_cc.value : input_bcc.value);
+ if (!rcube_check_email(recipients.replace(/^\s+/, '').replace(/[\s,;]+$/, ''), true))
{
alert(this.get_label('norecipientwarning'));
input_to.focus();