Revision 166f3c75
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/Mailer.pm | ||
---|---|---|
340 | 340 |
|
341 | 341 |
sub _store_in_imap_sent_folder { |
342 | 342 |
my ($self, $email_as_string) = @_; |
343 |
my $config = $::lx_office_conf{sent_emails_in_imap} || {}; |
|
344 |
return unless ($config->{enabled} && $config->{hostname}); |
|
343 |
my $config = { |
|
344 |
enabled => $::instance_conf->get_sent_emails_in_imap_enabled, |
|
345 |
hostname => $::instance_conf->get_sent_emails_in_imap_hostname, |
|
346 |
port => $::instance_conf->get_sent_emails_in_imap_port, |
|
347 |
ssl => $::instance_conf->get_sent_emails_in_imap_ssl, |
|
348 |
username => $::instance_conf->get_sent_emails_in_imap_username, |
|
349 |
password => $::instance_conf->get_sent_emails_in_imap_password, |
|
350 |
folder => $::instance_conf->get_sent_emails_in_imap_folder || 'Sent', |
|
351 |
}; |
|
352 |
return unless ($config->{enabled}); |
|
345 | 353 |
|
346 | 354 |
my $socket; |
347 | 355 |
if ($config->{ssl}) { |
... | ... | |
374 | 382 |
}; |
375 | 383 |
|
376 | 384 |
my $separator = $imap->separator(); |
377 |
my $folder = $config->{folder} || 'INBOX/Sent';
|
|
385 |
my $folder = $config->{folder}; |
|
378 | 386 |
$folder =~ s|/|${separator}|g; |
379 | 387 |
|
380 | 388 |
$imap->append_string($folder, $email_as_string) or do { |
SL/Mailer/SMTP.pm | ||
---|---|---|
24 | 24 |
extended_status => 'no send attempt made', |
25 | 25 |
); |
26 | 26 |
|
27 |
my $cfg = $::lx_office_conf{mail_delivery} || {}; |
|
27 |
my $cfg = { |
|
28 |
host => $::instance_conf->get_mail_delivery_host, |
|
29 |
port => $::instance_conf->get_mail_delivery_port, |
|
30 |
login => $::instance_conf->get_mail_delivery_login, |
|
31 |
password => $::instance_conf->get_mail_delivery_password, |
|
32 |
security => $::instance_conf->get_mail_delivery_security, |
|
33 |
}; |
|
28 | 34 |
$self->{security} = exists $security_config{lc $cfg->{security}} ? lc $cfg->{security} : 'none'; |
29 | 35 |
my $sec_cfg = $security_config{ $self->{security} }; |
30 | 36 |
|
... | ... | |
46 | 52 |
}; |
47 | 53 |
} |
48 | 54 |
|
49 |
# Backwards compatibility: older Versions used 'user' instead of the |
|
50 |
# intended 'login'. Support both. |
|
51 |
my $login = $cfg->{login} || $cfg->{user}; |
|
52 |
|
|
55 |
my $login = $cfg->{login}; |
|
53 | 56 |
return 1 unless $login; |
54 | 57 |
|
55 | 58 |
if (!$self->{smtp}->auth($login, $cfg->{password})) { |
config/kivitendo.conf.default | ||
---|---|---|
139 | 139 |
# |
140 | 140 |
|
141 | 141 |
[mail_delivery] |
142 |
# Delivery method can be 'sendmail' or 'smtp'. For 'method = sendmail' the |
|
143 |
# parameter 'mail_delivery.sendmail' is used as the executable to call. If |
|
144 |
# 'applications.sendmail' still exists (backwards compatibility) then |
|
145 |
# 'applications.sendmail' will be used instead of 'mail_delivery.sendmail'. |
|
142 |
# Delivery method can be 'sendmail' or 'smtp'. |
|
143 |
# For 'method = smtp' the setting for the mail delivery server are in the |
|
144 |
# 'mail server' tab in the client configuration. |
|
145 |
# For 'method = sendmail' the parameter 'mail_delivery.sendmail' is used as the |
|
146 |
# executable to call. If 'applications.sendmail' still exists (backwards |
|
147 |
# compatibility) then 'applications.sendmail' will be used instead of |
|
148 |
# 'mail_delivery.sendmail'. |
|
146 | 149 |
# If method is empty, mail delivery is disabled. |
147 | 150 |
method = smtp |
148 | 151 |
# Location of sendmail for 'method = sendmail' |
149 | 152 |
sendmail = /usr/sbin/sendmail -t<%if myconfig_email%> -f <%myconfig_email%><%end%> |
150 |
# Settings for 'method = smtp'. Only set 'port' if your SMTP server |
|
151 |
# runs on a non-standard port (25 for 'security=none' or |
|
152 |
# 'security=tls', 465 for 'security=ssl'). |
|
153 |
host = localhost |
|
154 |
#port = 25 |
|
155 |
# Security can be 'tls', 'ssl' or 'none'. Unset equals 'none'. This |
|
156 |
# determines whether or not encryption is used and which kind. For |
|
157 |
# 'tls' the module 'Net::SSLGlue' is required; for 'ssl' |
|
158 |
# 'Net::SMTP::SSL' is required and 'none' only uses 'Net::SMTP'. |
|
159 |
security = none |
|
160 |
# Authentication is only used if 'login' is set. You should only use |
|
161 |
# that with 'tls' or 'ssl' encryption. |
|
162 |
login = |
|
163 |
password = |
|
164 |
|
|
165 |
[sent_emails_in_imap] |
|
166 |
enabled = 0 |
|
167 |
hostname = localhost |
|
168 |
username = |
|
169 |
password = |
|
170 |
# Use / for subfolders |
|
171 |
folder = INBOX/Sent |
|
172 |
# Port only needs to be changed if it is not the default port. |
|
173 |
# port = 143 |
|
174 |
# If SSL is used, default port is 993 |
|
175 |
ssl = 1 |
|
176 | 153 |
|
177 | 154 |
[applications] |
178 | 155 |
# Location of OpenOffice.org/LibreOffice writer |
templates/design40_webpages/client_config/_mail_server.html | ||
---|---|---|
4 | 4 |
[% USE T8 %] |
5 | 5 |
|
6 | 6 |
<div id="mail_server"> |
7 |
[% IF LXCONFIG.mail_delivery.method == 'smtp' %] |
|
7 | 8 |
<div class="wrapper"> |
8 | 9 |
<table class="tbl-horizontal"> |
9 | 10 |
<caption>[% 'Mail Delivery' | $T8 %]</caption> |
... | ... | |
42 | 43 |
</tbody> |
43 | 44 |
</table> |
44 | 45 |
</div><!-- /.wrapper --> |
46 |
[% END %] |
|
45 | 47 |
<div class="wrapper"> |
46 | 48 |
<table class="tbl-horizontal"> |
47 | 49 |
<caption>[% 'IMAP Client' | $T8 %]</caption> |
templates/webpages/client_config/_mail_server.html | ||
---|---|---|
4 | 4 |
[% USE T8 %] |
5 | 5 |
|
6 | 6 |
<div id="mail_server"> |
7 |
[% IF LXCONFIG.mail_delivery.method == 'smtp' %] |
|
7 | 8 |
<div> |
8 | 9 |
<table> |
9 | 10 |
<colgroup> |
... | ... | |
40 | 41 |
</tbody> |
41 | 42 |
</table> |
42 | 43 |
</div> |
44 |
[% END %] |
|
43 | 45 |
<div> |
44 | 46 |
<table> |
45 | 47 |
<colgroup> |
Auch abrufbar als: Unified diff
Mailer: nutze Mandantenkonfiguration