Sending with Laravel
Configure Laravel’s native mailer to send via Mailofly SMTP.Configuration (.env)
Add the following environment variables to your .env file:
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
.env).env file:
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailofly.com
MAIL_PORT=587
MAIL_USERNAME=mailofly
MAIL_PASSWORD=mfly_live_your_api_key_here
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS="notifications@yourcompany.com"
MAIL_FROM_NAME="${APP_NAME}"
php artisan tinker
Mail::raw('Testing Mailofly SMTP from Laravel!', function ($message) {
$message->to('alex@example.com')->subject('Laravel Test Email');
});