How to send Laravel email using Unsend.

I’ve been using Unsend all over the place now that I’m self-hosting it.

In my Laravel apps I’d started out using a generic SMTP connection before realizing a simple custom transport could connect with the Unsend API directly.

The documentation was straightforward, and the bulk of the effort was mapping Laravel’s message details to a suitable API payload and testing it.

I started by creating app/Mail/Transports/UnsendTransport.php:

<?php

namespace App\Mail\Transports;

use Illuminate\Support\Facades\Http;
use Illuminate\Support\Uri;
use Symfony\Component\Mailer\SentMessage;
use Symfony\Component\Mailer\Tran...

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help