<?php

declare(strict_types=1);

namespace App\Framework\Email;

use App\Domain\Common\ValueObject\Email;
use App\Framework\Mail\Message;

/**
 * Interface for typed email classes
 * Email classes handle their own template rendering and convert to Mail\Message
 */
interface EmailInterface
{
    /**
     * Convert email to Mail module Message after rendering
     */
    public function toMessage(EmailTemplateRenderer $renderer, Email $defaultFrom): Message;
}
