Project

General

Profile

Bug #5486

ResetPassword e-mail = SPAM

Added by Ludwig Theunis over 7 years ago. Updated over 7 years ago.

Status:
Needs testing
Priority:
Normal
Assignee:
-
Start date:
16/09/2012
Due date:
% Done:

0%

Estimated time:
Complexity:
Normal

Description

The e-mails send by the default mail function when resetting password(s) ar labeled as SPAM. This is because no sender is set.

The e-mail for the platformadmin is set, even a 'noreply' e-mail is set. But apparently these settings are not used for the e-mailreset.
so
So I searched the code and found there is not sender (from) set in the e-mailing function for these e-mails... so temporarily changed it like this:
If a noreply e-mail is set, this e-mail will be used as sender. If not the platformadmin e-mail will be used.

/user/php/lib/user_manager/component/reset_password.class.php.
@
Private function creat_new_password($user): {
.
.
$mail_body = implode("\n", $mail_body);

$from['email'] = (PlatformSetting::get('no_reply_email') != '') ? PlatformSetting::get('no_reply_email') : PlatformSetting::get('administrator_email');
$mail = Mail :: factory($mail_subject, $mail_body, $user->get_email(), $from);

return $mail->send();
}
@

@
Private function send_reset_link($user): {
.
.

$mail_body = implode("\n", $mail_body);

$from['email'] = (PlatformSetting::get('no_reply_email') != '') ? PlatformSetting::get('no_reply_email') : PlatformSetting::get('administrator_email');
$mail = Mail :: factory($mail_subject, $mail_body, $user->get_email(), $from);

return $mail->send();
}
@

/user/php/lib/user_manager/component/multi_password_resetter.class.php.

@
function run() {
.
.

$from['email'] = (PlatformSetting::get('no_reply_email') != '') ? PlatformSetting::get('no_reply_email') : PlatformSetting::get('administrator_email');
$mail = Mail :: factory($mail_subject, $mail_body, $user->get_email(), $from);

$mail->send();
.
.

}
@

Associated revisions

Revision 4fd636a8 (diff)
Added by Julio Montoya about 7 years ago

Adding LP author image in the course home see #5486

History

#1

Updated by Parcifal Aertssen over 7 years ago

  • Status changed from New to Needs testing

This is now fixed on stable and dev

#2

Updated by Ludwig Theunis over 7 years ago

I've tested this and it is ok...

Also available in: Atom PDF