diff --git a/lib/MailClass.php b/lib/MailClass.php index 98e11e6..7174336 100644 --- a/lib/MailClass.php +++ b/lib/MailClass.php @@ -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' );