File tree Expand file tree Collapse file tree 3 files changed +15
-0
lines changed
Expand file tree Collapse file tree 3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ $wb['limit_mailforward_txt'] = 'Die maximale Anzahl an E-Mail Weiterleitungen f
66$wb['duplicate_mailbox_txt'] = 'Es existiert bereits ein E-Mail Konto mit dieser Adresse.';
77$wb['domain_txt'] = 'Domain';
88$wb['source_txt'] = 'Quell E-Mail Adresse';
9+ $wb['destination_error_empty'] = 'Das Weiterleitungsziel darf nicht leer sein.';
10+ $wb['destination_error_isemail'] = 'Das Weiterleitungsziel enthält mindestens eine ungültige E-Mail-Adresse.';
911$wb['email_error_isemail'] = 'Bitte geben Sie eine gültige E-Mail Adresse an.';
1012$wb['send_as_txt'] = 'Senden als';
1113$wb['send_as_exp'] = 'Ziel erlauben, die Adresse als Absender zu nutzen (Nur, falls das Ziel intern ist)';
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ $wb['limit_mailforward_txt'] = 'The max. number of email forwarders for your acc
66$wb['duplicate_mailbox_txt'] = 'There is already a mailbox with this email address';
77$wb['domain_txt'] = 'Domain';
88$wb['source_txt'] = 'Source Email';
9+ $wb['destination_error_empty'] = 'The destination must not be empty.';
10+ $wb['destination_error_isemail'] = 'The destination contains at least one invalid email address.';
911$wb['email_error_isemail'] = 'Please enter a valid email address.';
1012$wb['send_as_txt'] = 'Send as';
1113$wb['send_as_exp'] = 'Allow target to send mail using this address as origin (if target is internal)';
Original file line number Diff line number Diff line change @@ -120,6 +120,17 @@ function onSubmit() {
120120 unset($ this ->dataRecord ["email_local_part " ]);
121121 unset($ this ->dataRecord ["email_domain " ]);
122122
123+ if (trim ($ this ->dataRecord ['destination ' ]) == '' ) {
124+ $ app ->tform ->errorMessage .= $ app ->tform ->lng ('destination_error_empty ' ) . '<br /> ' ;
125+ } else {
126+ $ targets = preg_split ('/\s*[,;]\s*/ ' , trim ($ this ->dataRecord ['destination ' ]));
127+ foreach ($ targets as $ target ) {
128+ if (!$ target || filter_var ($ target , FILTER_VALIDATE_EMAIL ) === false ) {
129+ $ app ->tform ->errorMessage .= $ app ->tform ->lng ('destination_error_isemail ' ) . '<br /> '
130+ }
131+ }
132+ }
133+
123134 //* Check if there is no active mailbox with this address
124135 $ tmp = $ app ->db ->queryOneRecord ("SELECT count(mailuser_id) as number FROM mail_user WHERE postfix = 'y' AND email = ? " , $ this ->dataRecord ["source " ]);
125136 if ($ tmp ['number ' ] > 0 ) $ app ->tform ->errorMessage .= $ app ->tform ->lng ("duplicate_mailbox_txt " )."<br> " ;
You can’t perform that action at this time.
0 commit comments