Tinkerwell 4 is out now! Get the most popular PHP Scratchpad application. Tinkerwell 4 is out now: Get the most popular PHP Scratchpad with Detail Dive, AI code generation and more. Learn more
Once you have configured your mailboxes, you need to connect your email provider with this package. These are the supported drivers.
You can configure your driver by specifying the MAILBOX_DRIVER
environment variable in your .env
file.
To use Laravel Mailbox with your Mailgun account, you first need to set the MAILBOX_MAILGUN_KEY
environment variable to your Mailgun API key.
You can then set your MAILBOX_DRIVER
to "mailgun".
Next you will need to configure Mailgun, to send incoming emails to your application at /laravel-mailbox/mailgun/mime
. So if your application is at https://awesome-laravel.com
, it would be https://awesome-laravel.com/laravel-mailbox/mailgun/mime
.
See "Receiving, Forwarding and Storing Messages" in the Mailgun documentation.
::To use Postmark with Laravel Mailbox, you will need to generate a random password and store it as the MAILBOX_HTTP_PASSWORD
environment variable. The default username is "laravel-mailbox", but you can change it using the MAILBOX_HTTP_USERNAME
environment variable. ::
You can then set your MAILBOX_DRIVER
to "postmark".
Next you will need to configure Postmark, to send incoming emails to your application at /laravel-mailbox/postmark
. Use the username and the password that you generated for the URL.
If your application is at https://awesome-laravel.com
, it would be https://laravel-mailbox:[email protected]/laravel-mailbox/postmark
.
See the official "Postmark documentation".
Be sure the check the box labeled "Include raw email content in JSON payload" when setting up Postmark.
::To use SendGrid with Laravel Mailbox, you will need to generate a random password and store it as the MAILBOX_HTTP_PASSWORD
environment variable. The default username is "laravel-mailbox", but you can change it using the MAILBOX_HTTP_USERNAME
environment variable. ::
You can then set your MAILBOX_DRIVER
to "sendgrid".
Next you will need to configure SendGrid Inbound parse, to send incoming emails to your application at /laravel-mailbox/sendgrid
. Use the username and the password that you generated for the URL.
If your application is at https://awesome-laravel.com
, it would be https://laravel-mailbox:[email protected]/laravel-mailbox/sendgrid
.
Be sure the check the box labeled "Post the raw, full MIME message." when setting up SendGrid.
You can then set your MAILBOX_DRIVER
to "mailcare".
Next you will need to configure MailCare, to send incoming emails to your application at /laravel-mailbox/mailcare
:
https://your-application.com/laravel-mailbox/mailcare
See "MailCare" for more information.
When working locally, you might not want to use real incoming emails while testing your application. Out of the box, this package supports Laravel's "log" mail driver for incoming emails.
To test incoming emails, set both your MAIL_DRIVER
and your MAILBOX_DRIVER
in your .env
file to "log".
Now every time you send an email in your application, this email will appear in your laravel.log
file and will try to call one of your configured Mailboxes.
Herd is a blazing fast, native Laravel and PHP development environment for macOS. It includes everything you need to get started with Laravel development, including PHP and nginx. Once you install Herd, you're ready to start developing with Laravel.
Herd is available for macOS and Windows.
Learn more