<?php

namespace App\Http\Requests\Email;

use App\Http\Requests\ApiFormRequest;

class EmailSendRequest extends ApiFormRequest
{
    public function authorize(): bool
    {
        return true;
    }

    public function rules(): array
    {
        return [
            'recipient' => ['required', 'email'],
            'subject' => ['required', 'string', 'max:255'],
            'html_message' => ['required', 'string'],
            'profile' => ['nullable', 'string', 'max:50'],
            'reply_to_email' => ['nullable', 'email'],
            'reply_to_name' => ['nullable', 'string', 'max:100'],
            'attachments' => ['nullable', 'array'],
            'attachments.*' => ['file', 'max:5120'],
        ];
    }
}
