Skip to content

Commit

Permalink
fix(mail): Log hint when mail_from_address may be wrong
Browse files Browse the repository at this point in the history
Fixes #25162 

Signed-off-by: Josh <josh.t.richards@gmail.com>
  • Loading branch information
joshtrichards committed Jun 21, 2024
1 parent da8e1c1 commit 5cab1a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/public/Util.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ public static function getDefaultEmailAddress(string $user_part): string {
return $defaultEmailAddress;
}

// in case we cannot build a valid email address from the hostname let's fallback to 'localhost.localdomain'
// in case we cannot build a valid email address from the hostname we log an error and fallback to 'localhost.localdomain' for now
\OCP\Server::get(LoggerInterface::class)->error('Unable to determine default email address ("mail_from_address" may be wrong). Using ' . $user_part . '@localhost.localdomain for the time being.');
return $user_part.'@localhost.localdomain';
}

Expand Down

0 comments on commit 5cab1a1

Please sign in to comment.