reply with correct mail server address.

pull/16/head
Alex Puiu 2022-02-08 15:06:13 +02:00
rodzic 27e908f2c3
commit 08e8b51cc7
1 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -31,10 +31,16 @@ class MailClass {
}
public function reply($sender, $response = null) {
$serverName = parse_url(NC_SERVER);
$server = NC_SERVER;
if(str_contains($server, "https://")) {
$server = str_replace('https://', '', $server);
} else if(str_contains($server, "http://")) {
$server = str_replace('http://', '', $server);
}
$headers = array(
'From' => 'no-reply@' . $serverName['host'],
'From' => 'no-reply@' . $server,
'MIME-Version' => '1.0',
'Content-Type' => 'text/html'
);