has('html_message') && $this->has('html')) { $this->merge(['html_message' => $this->input('html')]); } } public function authorize(): bool { return auth()->check(); } public function rules(): array { return [ 'recipient' => ['required', 'email', 'max:255'], 'subject' => ['required', 'string', 'max:255'], 'html_message' => ['required', 'string'], 'profile' => ['nullable', 'string', 'max:50'], 'reply_to_email' => ['nullable', 'email', 'max:255'], 'reply_to_name' => ['nullable', 'string', 'max:255'], ]; } }