<?php
declare(strict_types=1);

namespace FreshCloud\Mail\SmtpClient;

final readonly class SmtpCredentials
{
    public function __construct(
        public string $host,
        public int $port,
        public string $username,
        public string $password,
        public string $encryption,
        public string $userId,
        public string $accountId,
    ) {
        if ($port < 1 || $port > 65535) {
            throw new \InvalidArgumentException('Port must be between 1 and 65535');
        }

        if (empty($host)) {
            throw new \InvalidArgumentException('Host cannot be empty');
        }
    }
}