Commit 6890b290 authored by Maxime Besson's avatar Maxime Besson

Fix plaintext email

For the few of us who like plain text email better.

Before this commit, the mail body would not be correctly pulled from
config, and then the portal would error 500 due to MIME::Entity objects
not having an "attr" accessor, unlike the previously used MIME::Lite
objects
parent f1d64967
......@@ -199,12 +199,9 @@ sub send_mail {
Subject => $subject,
Type => 'TEXT',
Data => $body,
Type => 'text/plain',
Charset => $self->charset,
);
# Manage content type and charset
$message->attr( "content-type" => "text/plain" );
$message->attr( "content-type.charset" => $self->charset );
}
# Send the mail
......
......@@ -326,7 +326,7 @@ sub _reset {
if ( $self->conf->{mailConfirmBody} ) {
# We use a specific text message, no html
$body = $self->{mailConfirmBody};
$body = $self->conf->{mailConfirmBody};
}
else {
......@@ -464,7 +464,7 @@ sub changePwd {
if ( $self->conf->{mailBody} ) {
# We use a specific text message, no html
$body = $self->{mailBody};
$body = $self->conf->{mailBody};
}
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment