mailwolt/app/Support/Hostnames.php

20 lines
356 B
PHP

<?php
namespace App\Support;
final class Hostnames
{
public static function base(): string
{
return trim(env('BASE_DOMAIN', 'example.com'));
}
public static function mta(): string
{
$sub = trim(env('MTA_SUB', 'mx'), '.');
$base = self::base();
return $sub === '' ? $base : "{$sub}.{$base}";
}
}