Dynamically build Mail, DB, and Cache configurations in Laravel
Laravel’s new build() methods allow dynamic configuration of mail, database, and cache settings.
Read more [amitmerchant.com]
Posts tagged with mail
Laravel’s new build() methods allow dynamic configuration of mail, database, and cache settings.
Read more [amitmerchant.com]
– ashallendesign.co.uk - submitted by Ash Allen
Read about how to encrypt queued jobs, notifications, mailables, and listeners in Laravel for improved security.
Read more [ashallendesign.co.uk]
Join 9,500+ smart developers
Every month I share what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime. You can also follow me on X.
In this post, you'll learn how Ray can help you preview emails in your local environment and how it can simplify the process of developing and testing email workflows in Laravel.
Read more [myray.app]
I'm proud to share that we've released two new packages: spatie/laravel-mailcoach-mailer (for Laravel apps) and spatie/mailcoach-mailer (for all other PHP based apps).
Using these two packages, you can send transactional mail through Mailcoach Cloud.
In this blog post, I'd like to share how you can use these packages and how they work under the hood.
– ralphjsmit.com - submitted by Ralph J. Smit
In this tutorial I'll show you how to use event listeners to stop outgoing emails just before they're sent.
Read more [ralphjsmit.com]
Laravel 9 has gained a excellent new way to attach files in mails. Using the Attachable interface, you can specify what should happen when an object gets used as an attachment.
Using our media library package you can easily associate any file with an Eloquent model. We've added support for Laravel's Attachable in the latest version of the package.
In this blog post, I'd like to tell you all about it.
– ralphjsmit.com - submitted by Ralph J. Smit
In this tutorial I'll show you how to send e-mails from Laravel with Tailwind CSS. I'll learn you how to set this up and how to inline all the Tailwind CSS-classes.
Read more [ralphjsmit.com]
Quick @laravelphp tip: The `MailMessage` class has a `when` method that's useful to conditionally add things to the mailable. Great for adding optional lines. 🤠 pic.twitter.com/TGGb5J6zk2
— Wilbur Powery E. (@wilburpowery) February 22, 2021
Read more [twitter.com]
– ryangjchandler.co.uk - submitted by Ryan Chandler
Testing emails can be a pain. Luckily, there are plenty of tools out there that can make the process a lot easier. Let me show you how to setup MailHog, a local development tool for testing emails.
Read more [ryangjchandler.co.uk]
Using our laravel-mail-preview package, you can quickly display mails that are sent by your Laravel application in your browser.
Today, we've released v5 of the package. In this blog post, I'd like to tell you all about it.
Contrary to the title, Gilles Chehade that it's acutually doable running your own mailserver.
TL;DR: Mail is not hard: people keep repeating that because they read it, not because they tried it. Big Mailer Corps are quite happy with that myth, it keeps their userbase growing. Big Mailer Corps control a large percentage of the e-mail address space which is good for none …
Read more [poolp.org]
Jason McCreary, creator of Laravel Shift, wrote a post mortem on a problem where too many mails were sent.
It was 7:07 am. I woke up to 56 emails, 17 tweets, 9 Slack messages, and 4 telegrams. All of which alerting me my SaSS product had sent 3,625 email messages to 1,544 users overnight. I am Jack's cold sweat. ?
Read more [jasonmccreary.me]
Marcel Pociot recently released another awesome package: laravel-mailbox. In a new post on his blog he guides us through the code.
Read more [marcelpociot.de]
In an older post on his blog Mohammed Said, Laravel Employee #1, shares a cool trick on how to avoid having to create an event listener.
Instead of having to create a class for the listener and another for the notification/mailable, wouldn't it be cool if we can register the Notification/Mailable as an event listener? ... While some may consider this an anti-SRP hack I think it's a pretty neat implementation that you can use in your application to prevent creating an extra listener class, your call :)
Read more [themsaid.com]
I'm currently building a webapp named Oh Dear: an easy to use and beautiful website monitor. It has recently gone into it's beta phase. At the moment of writing everybody can register a new account. After you've registered you'll start your trial period of 10 days. Oh Dear is built on top Laravel…
Most of the Laravel apps we create at Spatie will send mails. This can be a password reset mail, a welcome mail after registration, an order confirmation mail, ... One of the things we do is styling such mails so it has the same look and feel as the site it was sent from. When testing such mails our designers had to request a password reset or go through the entire checkout flow just to receive such an order confirmation mail. To make that testing process a lot easier we've created a package called laravel-mailable-test. This package provides an artisan command that can send a mailable to an mail-address.
To send any mailable issue this artisan command:
php artisan mail:send-test "App\Mail\MyMailable" recipient@mail.com
This will send the given mailable to the given email address. The to-, cc- and bcc-addresses that may be set in the given mailable will be cleared. The mail will only be sent to the email address given in the artisan command.
The package will provide a value for any typehinted argument of the constructor of the mailable. If an argument is a int, string or bool the package will generated a value using Faker. Any argument that typehints an Eloquent model will receive the first record of that model.
Image the constructor of your mailable looks like this:
public function __construct(string $title, Order $order)
{
...
}
That constructor will receive a string generated by the sentence method of Faker and the first Order in your database.
The values that are passed to the constructor of the mailable can be customized using the values option of the command.
php artisan mail:send-test "App\Mail\MyMailable" recipient@mail.com --values="title:My title,order:5"
Using this command My title will be passed to $title and an Order with id 5 will be passed to $order.
To learn more about the package head over to the readme on GitHub. Be sure take also take a look at this list of Laravel packages our team has previously made.
Recently I was working an a project where, in order to use the webapp, users should first apply for an account. Potential users can fill in request form. After the request is approved by an admin they may use the app. Our client expected that the barrier to request an account should be very low.…
Over at Sitepoint, Younes Rafie wrote a tutorial on how to create a custom mail driver in Laravel 5.3. In the post he shows some code that can log all email to the database.
One of the many goodies Laravel offers is mailing. You can easily configure and send emails through multiple popular services. ... Laravel also provides a good starting point for sending mails during the development phase using the log driver, and in production using smtp, sparkpost, mailgun, etc. This seems fine in most cases, but it can’t cover all the available services! In this tutorial, we’re going to learn how to extend the existing mail driver system to add our own.
https://www.sitepoint.com/mail-logging-in-laravel-5-3-extending-the-mail-driver/
Tighten has developed a very useful package for testing mail in Laravel.