Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
Zvonimir
ISPConfig 3
Commits
f798aa09
Commit
f798aa09
authored
Feb 12, 2014
by
Falko Timme
Browse files
- Implemented FS#3310 - add support for multiple email addresses in send copy to field (patch).
parent
a01d1a3a
Changes
14
Hide whitespace changes
Inline
Side-by-side
interface/lib/classes/tform.inc.php
View file @
f798aa09
...
...
@@ -1302,7 +1302,7 @@ class tform {
$perm
=
$app
->
db
->
quote
(
$perm
);
$table
=
$app
->
db
->
quote
(
$table
);
if
(
$_SESSION
[
"s"
][
"user"
][
"typ"
]
==
'admin'
)
{
if
(
$_SESSION
[
"s"
][
"user"
][
"typ"
]
==
'admin'
||
$_SESSION
[
's'
][
'user'
][
'mailuser_id'
]
>
0
)
{
return
'1'
;
}
else
{
if
(
$table
!=
''
){
...
...
interface/web/mail/form/mail_user.tform.php
View file @
f798aa09
...
...
@@ -160,7 +160,7 @@ $form["tabs"]['mailuser'] = array(
'type'
=>
'TOLOWER'
)
),
'validators'
=>
array
(
0
=>
array
(
'type'
=>
'REGEX'
,
'regex'
=>
'/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i'
,
'regex'
=>
'/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}
(,\s*\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,}
$/i'
,
'errmsg'
=>
'cc_error_isemail'
),
),
'default'
=>
''
,
...
...
interface/web/mail/lib/lang/de_mail_user.lng
View file @
f798aa09
...
...
@@ -48,4 +48,5 @@ $wb['repeat_password_txt'] = 'Passwort wiederholen';
$wb
[
'password_mismatch_txt'
]
=
'Die Passwörter stimmen nicht überein.'
;
$wb
[
'password_match_txt'
]
=
'Die Passwörter stimmen überein.'
;
$wb
[
'email_error_isascii'
]
=
'Bitte verwenden Sie keine Umlaute im Passwort. Dies kann zu Problemen mit Ihrem E-Mail-Programm führen.'
;
$wb
[
'cc_note_txt'
]
=
'(Mehrere E-Mail-Adressen mit Kommas trennen)'
;
?>
\ No newline at end of file
interface/web/mail/lib/lang/en_mail_user.lng
View file @
f798aa09
...
...
@@ -48,4 +48,5 @@ $wb['repeat_password_txt'] = 'Repeat Password';
$wb
[
'password_mismatch_txt'
]
=
'The passwords do not match.'
;
$wb
[
'password_match_txt'
]
=
'The passwords do match.'
;
$wb
[
'email_error_isascii'
]
=
'Please do not use special unicode characters for your password. This could lead to problems with your mail client.'
;
$wb
[
'cc_note_txt'
]
=
'(Separate multiple email addresses with commas)'
;
?>
interface/web/mail/templates/mail_user_mailbox_edit.htm
View file @
f798aa09
...
...
@@ -42,7 +42,7 @@
</div>
<div
class=
"ctrlHolder"
>
<label
for=
"name"
>
{tmpl_var name='cc_txt'}
</label>
<input
name=
"cc"
id=
"cc"
value=
"{tmpl_var name='cc'}"
size=
"30"
maxlength=
"255"
type=
"text"
class=
"textInput"
/>
{tmpl_var name='name_optional_txt'}
<input
name=
"cc"
id=
"cc"
value=
"{tmpl_var name='cc'}"
size=
"30"
maxlength=
"255"
type=
"text"
class=
"textInput"
/>
{tmpl_var name='name_optional_txt'}
{tmpl_var name='cc_note_txt'}
</div>
<div
class=
"ctrlHolder"
>
<label
for=
"policy"
>
{tmpl_var name='policy_txt'}
</label>
...
...
interface/web/mailuser/form/mail_user_cc.tform.php
View file @
f798aa09
...
...
@@ -69,7 +69,8 @@ $form["tabs"]['mailuser'] = array (
'type'
=>
'TOLOWER'
)
),
'validators'
=>
array
(
0
=>
array
(
'type'
=>
'REGEX'
,
'regex'
=>
'/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z\-]{2,10}){0,1}$/i'
,
//'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z\-]{2,10}){0,1}$/i',
'regex'
=>
'/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}(,\s*\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,}$/i'
,
'errmsg'
=>
'cc_error_isemail'
),
),
'default'
=>
''
,
...
...
interface/web/mailuser/lib/lang/de_mail_user_cc.lng
View file @
f798aa09
...
...
@@ -4,4 +4,6 @@ $wb['cc_txt'] = 'Kopie senden an';
$wb
[
'email_txt'
]
=
'E-Mail'
;
$wb
[
'cc_error_isemail'
]
=
'E-Mail Adresse ungültig im -Kopie senden an- Feld'
;
$wb
[
'email_is_cc_error'
]
=
'E-Mail Adresse und '
;
$wb
[
'name_optional_txt'
]
=
'(optional)'
;
$wb
[
'cc_note_txt'
]
=
'(Mehrere E-Mail-Adressen mit Kommas trennen)'
;
?>
\ No newline at end of file
interface/web/mailuser/lib/lang/en_mail_user_cc.lng
View file @
f798aa09
...
...
@@ -4,4 +4,6 @@ $wb["cc_txt"] = 'Send copy to';
$wb
[
"email_txt"
]
=
'Email'
;
$wb
[
"cc_error_isemail"
]
=
'Email address invalid in -Send copy to- field'
;
$wb
[
"email_is_cc_error"
]
=
'Email address and send copy to address can not be the same.'
;
$wb
[
"name_optional_txt"
]
=
'(Optional)'
;
$wb
[
'cc_note_txt'
]
=
'(Separate multiple email addresses with commas)'
;
?>
\ No newline at end of file
interface/web/mailuser/mail_user_spamfilter_edit.php
View file @
f798aa09
...
...
@@ -51,7 +51,8 @@ $app->load('tform_actions');
class
page_action
extends
tform_actions
{
function
onShow
()
{
global
$app
;
$this
->
id
=
$app
->
functions
->
intval
(
$_SESSION
[
's'
][
'user'
][
'mailuser_id'
]);
parent
::
onShow
();
...
...
interface/web/mailuser/templates/mail_user_cc_edit.htm
View file @
f798aa09
...
...
@@ -11,7 +11,7 @@
</div>
<div
class=
"ctrlHolder"
>
<label
for=
"name"
>
{tmpl_var name='cc_txt'}
</label>
<input
name=
"cc"
id=
"cc"
value=
"{tmpl_var name='cc'}"
size=
"30"
maxlength=
"255"
type=
"text"
class=
"textInput"
/>
{tmpl_var name='name_optional_txt'}
<input
name=
"cc"
id=
"cc"
value=
"{tmpl_var name='cc'}"
size=
"30"
maxlength=
"255"
type=
"text"
class=
"textInput"
/>
{tmpl_var name='name_optional_txt'}
{tmpl_var name='cc_note_txt'}
</div>
</fieldset>
...
...
server/conf/sieve_filter.master
View file @
f798aa09
...
...
@@ -2,7 +2,9 @@ require ["fileinto", "regex", "vacation"];
<tmpl_if name="cc">
# Send a copy of email to
redirect "<tmpl_var name='cc'>";
<tmpl_loop name="ccloop">
redirect "<tmpl_var name='address'>";
</tmpl_loop>
</tmpl_if>
<tmpl_if name="move_junk" op="==" value="y">
...
...
server/conf/sieve_filter_1.2.master
View file @
f798aa09
...
...
@@ -2,7 +2,9 @@ require ["fileinto", "regex", "date", "relational", "vacation"];
<tmpl_if name="cc">
# Send a copy of email to
redirect "<tmpl_var name='cc'>";
<tmpl_loop name="ccloop">
redirect "<tmpl_var name='address'>";
</tmpl_loop>
</tmpl_if>
<tmpl_if name="move_junk" op="==" value="y">
...
...
server/plugins-available/maildeliver_plugin.inc.php
View file @
f798aa09
...
...
@@ -120,7 +120,14 @@ class maildeliver_plugin {
$tpl
->
newTemplate
(
$filter_file_template
);
// cc Field
$tmp_mails_arr
=
explode
(
','
,
$data
[
"new"
][
"cc"
]);
$tmp_addresses_arr
=
array
();
foreach
(
$tmp_mails_arr
as
$address
)
{
if
(
trim
(
$address
)
!=
''
)
$tmp_addresses_arr
[]
=
array
(
'address'
=>
trim
(
$address
));
}
$tpl
->
setVar
(
'cc'
,
$data
[
"new"
][
"cc"
]);
$tpl
->
setLoop
(
'ccloop'
,
$tmp_addresses_arr
);
// Custom filters
$tpl
->
setVar
(
'custom_mailfilter'
,
$data
[
"new"
][
"custom_mailfilter"
]);
...
...
server/plugins-available/maildrop_plugin.inc.php
View file @
f798aa09
...
...
@@ -192,7 +192,11 @@ class maildrop_plugin {
$mailfilter_content
=
''
;
if
(
$data
[
"new"
][
"cc"
]
!=
''
)
{
$mailfilter_content
.
=
"cc
\"
!"
.
$data
[
"new"
][
"cc"
]
.
"
\"\n
"
;
$tmp_mails_arr
=
explode
(
','
,
$data
[
"new"
][
"cc"
]);
foreach
(
$tmp_mails_arr
as
$address
)
{
if
(
trim
(
$address
)
!=
''
)
$mailfilter_content
.
=
"cc
\"
!"
.
trim
(
$address
)
.
"
\"\n
"
;
}
//$mailfilter_content .= "cc \"!".$data["new"]["cc"]."\"\n";
$app
->
log
(
"Added CC address "
.
$data
[
"new"
][
"cc"
]
.
' to mailfilter file.'
,
LOGLEVEL_DEBUG
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment