Configure Reply-To address (#312)
This commit is contained in:
parent
e661459a88
commit
eb01359322
|
@ -133,6 +133,8 @@ localStorageOptions={ 'namespace' => 'MyNamespace', 'default_expires_in' => 600,
|
|||
;SMTPAuthPass = secret
|
||||
# Mail From address
|
||||
;mailFrom = noreply@test.com
|
||||
# Reply To
|
||||
;mailReplyTo = noreply@test.com
|
||||
# Mail confirmation URL
|
||||
;mailUrl = http://reset.example.com
|
||||
# Mail subject for confirmation message
|
||||
|
|
|
@ -773,7 +773,7 @@ sub struct {
|
|||
|
||||
passwordManagement => {
|
||||
_nodes => [
|
||||
qw(SMTPServer SMTPAuthUser SMTPAuthPass mailUrl mailFrom mailSubject mailBody mailConfirmSubject mailConfirmBody randomPasswordRegexp)
|
||||
qw(SMTPServer SMTPAuthUser SMTPAuthPass mailUrl mailFrom mailReplyTo mailSubject mailBody mailConfirmSubject mailConfirmBody randomPasswordRegexp)
|
||||
],
|
||||
_help => 'password',
|
||||
SMTPServer => 'text:/SMTPServer',
|
||||
|
@ -781,6 +781,7 @@ sub struct {
|
|||
SMTPAuthPass => 'text:/SMTPAuthPass',
|
||||
mailUrl => 'text:/mailUrl',
|
||||
mailFrom => 'text:/mailFrom',
|
||||
mailReplyTo => 'text:/mailReplyTo',
|
||||
mailSubject => 'text:/mailSubject',
|
||||
mailBody => 'textarea:/mailBody',
|
||||
mailConfirmSubject => 'text:/mailConfirmSubject',
|
||||
|
@ -1195,6 +1196,7 @@ sub testStruct {
|
|||
keyMsgFail => 'Bad category ID',
|
||||
},
|
||||
mailFrom => $testNotDefined,
|
||||
mailReplyTo => $testNotDefined,
|
||||
trustedDomains => $testNotDefined,
|
||||
exportedAttr => $testNotDefined,
|
||||
mailSubject => $testNotDefined,
|
||||
|
|
|
@ -185,6 +185,7 @@ sub en {
|
|||
mailConfirmSubject => 'Confirmation mail subject',
|
||||
mailFrom => 'Mail sender',
|
||||
mailLDAPFilter => 'Mail filter',
|
||||
mailReplyTo => 'Reply address',
|
||||
mailSubject => 'Success mail subject',
|
||||
mailUrl => 'Page URL',
|
||||
managerDn => 'Account',
|
||||
|
@ -579,6 +580,7 @@ sub fr {
|
|||
mailConfirmSubject => 'Sujet du message de confirmation',
|
||||
mailFrom => 'Expéditeur du message',
|
||||
mailLDAPFilter => 'Filtre mail',
|
||||
mailReplyTo => 'Adresse de réponse',
|
||||
mailSubject => 'Sujet du message de succès',
|
||||
mailUrl => 'URL de la page',
|
||||
managerDn => 'Compte de connexion LDAP',
|
||||
|
|
|
@ -42,13 +42,17 @@ sub send_mail {
|
|||
$self->lmLog( "SMTP Subject " . $subject, 'debug' );
|
||||
$self->lmLog( "SMTP Body " . $body, 'debug' );
|
||||
$self->lmLog( "SMTP HTML flag " . ( $html ? "on" : "off" ), 'debug' );
|
||||
$self->lmLog( "SMTP Reply-To " . $self->{mailReplyTo}, 'debug' )
|
||||
if $self->{mailReplyTo};
|
||||
|
||||
eval {
|
||||
my $message = MIME::Lite->new(
|
||||
From => $self->{mailFrom},
|
||||
To => $mail,
|
||||
Subject => $subject,
|
||||
Type => "TEXT",
|
||||
Data => $body,
|
||||
From => $self->{mailFrom},
|
||||
To => $mail,
|
||||
"Reply-To" => $self->{mailReplyTo},
|
||||
Subject => $subject,
|
||||
Type => "TEXT",
|
||||
Data => $body,
|
||||
);
|
||||
$message->attr( "content-type" => "text/html; charset=utf-8" ) if $html;
|
||||
$self->{SMTPServer}
|
||||
|
|
Loading…
Reference in New Issue
Block a user