Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 65a720c0 authored by Israel Yago Pereira's avatar Israel Yago Pereira
Browse files

Fallback MAIL_FROM to SMTP_FROM

parent 0a7fb019
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -214,7 +214,7 @@ function sendWelcomeMailWithPHPMail(string $to, string $mbox, string $domain, st

    $body = $mime->get();

    $from = getenv("MAIL_FROM");
    $from = getenv("MAIL_FROM") ? getenv("MAIL_FROM") : getenv("SMTP_FROM");
    $host = getenv("SMTP_HOST");
    $username = getenv("SMTP_FROM");
    $password = getenv("SMTP_PW");
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ function sendInviteMailWithPHPMail(string $to, string $signupURL, string $lang):
        $template = json_decode($content, false);
    }
    $subject = $template->subject;
    $from = getenv("MAIL_FROM");
    $from = getenv("MAIL_FROM") ? getenv("MAIL_FROM") : getenv("SMTP_FROM");
    $headers = ['From' => $from, 'To' => $to, 'Subject' => $subject,
        'Content-Type' => 'text/html; charset=UTF-8', 'Date' => date('D, d M Y H:i:s O')];