feat(mail-test): implement email testing functionality
- Created MailTestController to handle email sending requests. - Added SendTestMailRequest for validating email input. - Developed MailTestService to manage email sending logic. - Introduced TestMail Mailable for formatting test emails. - Defined API route for sending test emails. - Created EmailIntegrationSeeder to seed email integration settings. - Updated DatabaseSeeder to include EmailIntegrationSeeder. - Added MailTestControllerTest to ensure email sending functionality works as expected.
This commit is contained in:
25
app/Domains/MailTest/Requests/SendTestMailRequest.php
Normal file
25
app/Domains/MailTest/Requests/SendTestMailRequest.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Domains\MailTest\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SendTestMailRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, array<int, string>>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'to' => ['required', 'string', 'email', 'max:255'],
|
||||
'subject' => ['nullable', 'string', 'max:255'],
|
||||
'message' => ['nullable', 'string', 'max:5000'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user