Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 166f3c75

Von Tamino Steinert vor fast 2 Jahren hinzugefügt

  • ID 166f3c7527f7d60508bd8ed46fac2ade7f12791d
  • Vorgänger 98c1b560
  • Nachfolger beccf093

Mailer: nutze Mandantenkonfiguration

Unterschiede anzeigen:

SL/Mailer.pm
sub _store_in_imap_sent_folder {
my ($self, $email_as_string) = @_;
my $config = $::lx_office_conf{sent_emails_in_imap} || {};
return unless ($config->{enabled} && $config->{hostname});
my $config = {
enabled => $::instance_conf->get_sent_emails_in_imap_enabled,
hostname => $::instance_conf->get_sent_emails_in_imap_hostname,
port => $::instance_conf->get_sent_emails_in_imap_port,
ssl => $::instance_conf->get_sent_emails_in_imap_ssl,
username => $::instance_conf->get_sent_emails_in_imap_username,
password => $::instance_conf->get_sent_emails_in_imap_password,
folder => $::instance_conf->get_sent_emails_in_imap_folder || 'Sent',
};
return unless ($config->{enabled});
my $socket;
if ($config->{ssl}) {
......
};
my $separator = $imap->separator();
my $folder = $config->{folder} || 'INBOX/Sent';
my $folder = $config->{folder};
$folder =~ s|/|${separator}|g;
$imap->append_string($folder, $email_as_string) or do {
SL/Mailer/SMTP.pm
extended_status => 'no send attempt made',
);
my $cfg = $::lx_office_conf{mail_delivery} || {};
my $cfg = {
host => $::instance_conf->get_mail_delivery_host,
port => $::instance_conf->get_mail_delivery_port,
login => $::instance_conf->get_mail_delivery_login,
password => $::instance_conf->get_mail_delivery_password,
security => $::instance_conf->get_mail_delivery_security,
};
$self->{security} = exists $security_config{lc $cfg->{security}} ? lc $cfg->{security} : 'none';
my $sec_cfg = $security_config{ $self->{security} };
......
};
}
# Backwards compatibility: older Versions used 'user' instead of the
# intended 'login'. Support both.
my $login = $cfg->{login} || $cfg->{user};
my $login = $cfg->{login};
return 1 unless $login;
if (!$self->{smtp}->auth($login, $cfg->{password})) {
config/kivitendo.conf.default
#
[mail_delivery]
# Delivery method can be 'sendmail' or 'smtp'. For 'method = sendmail' the
# parameter 'mail_delivery.sendmail' is used as the executable to call. If
# 'applications.sendmail' still exists (backwards compatibility) then
# 'applications.sendmail' will be used instead of 'mail_delivery.sendmail'.
# Delivery method can be 'sendmail' or 'smtp'.
# For 'method = smtp' the setting for the mail delivery server are in the
# 'mail server' tab in the client configuration.
# For 'method = sendmail' the parameter 'mail_delivery.sendmail' is used as the
# executable to call. If 'applications.sendmail' still exists (backwards
# compatibility) then 'applications.sendmail' will be used instead of
# 'mail_delivery.sendmail'.
# If method is empty, mail delivery is disabled.
method = smtp
# Location of sendmail for 'method = sendmail'
sendmail = /usr/sbin/sendmail -t<%if myconfig_email%> -f <%myconfig_email%><%end%>
# Settings for 'method = smtp'. Only set 'port' if your SMTP server
# runs on a non-standard port (25 for 'security=none' or
# 'security=tls', 465 for 'security=ssl').
host = localhost
#port = 25
# Security can be 'tls', 'ssl' or 'none'. Unset equals 'none'. This
# determines whether or not encryption is used and which kind. For
# 'tls' the module 'Net::SSLGlue' is required; for 'ssl'
# 'Net::SMTP::SSL' is required and 'none' only uses 'Net::SMTP'.
security = none
# Authentication is only used if 'login' is set. You should only use
# that with 'tls' or 'ssl' encryption.
login =
password =
[sent_emails_in_imap]
enabled = 0
hostname = localhost
username =
password =
# Use / for subfolders
folder = INBOX/Sent
# Port only needs to be changed if it is not the default port.
# port = 143
# If SSL is used, default port is 993
ssl = 1
[applications]
# Location of OpenOffice.org/LibreOffice writer
templates/design40_webpages/client_config/_mail_server.html
[% USE T8 %]
<div id="mail_server">
[% IF LXCONFIG.mail_delivery.method == 'smtp' %]
<div class="wrapper">
<table class="tbl-horizontal">
<caption>[% 'Mail Delivery' | $T8 %]</caption>
......
</tbody>
</table>
</div><!-- /.wrapper -->
[% END %]
<div class="wrapper">
<table class="tbl-horizontal">
<caption>[% 'IMAP Client' | $T8 %]</caption>
templates/webpages/client_config/_mail_server.html
[% USE T8 %]
<div id="mail_server">
[% IF LXCONFIG.mail_delivery.method == 'smtp' %]
<div>
<table>
<colgroup>
......
</tbody>
</table>
</div>
[% END %]
<div>
<table>
<colgroup>

Auch abrufbar als: Unified diff