Set Sitename / site email as sender for system emails

This commit is contained in:
nupplaPhil 2020-02-01 22:30:10 +01:00
parent 0966cdbb26
commit 9428466d1d
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
8 changed files with 27 additions and 17 deletions

View file

@ -138,11 +138,7 @@ abstract class MailBuilder
*/
public function build(bool $raw = false)
{
if (empty($this->recipientAddress)) {
throw new InternalServerErrorException('Recipient address is missing.');
}
if ((empty($this->senderName) || empty($this->senderAddress)) &&
if ((empty($this->recipientAddress)) &&
!empty($this->recipientUid)) {
$user = User::getById($this->recipientUid, ['username', 'email']);