Help your users verify their email with Sniper Link

Published at Apr 19, 2024

Hey! I discovered this tool while using Mailcoach and I think it's very useful. May I introduce Sniper link, a little javascript tool showing a button that directly opens the user’s email client.

Here is an example of implementing it in Laravel Fortify, find verify-email.blade.php, and add the following code

<x-slot name="logo">
<div class="mb-4 text-sm text-gray-600"...
{{ __('Before continuing, could you verify your email address by clicking on the link we just emailed to you? If you didn\'t receive the email, we will gladly send you another.'}}
@if (session('status') == 'verification-link-sent')
<div class="mb-4 font-medium text-sm text-green-600">
{{ __('A new verification link has been sent to the email address you provided in your profile settings.'}}
<div class="flex items-center justify-around min-h-14">
recipient="{{ auth()->user()->email }}"
sender="{{ config('mail.from.address'}}"
template="Check my emails on {provider}"
<script src="" defer></script>
<div class="mt-4 flex items-center justify-between"...
<form method="POST" action="{{ route('verification.send'}}">
<x-button type="submit">
{{ __('Resend Verification Email'}}
<a href="{{ route('') }}" class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500">
{{ __('Edit Profile'}}</a>
<form method="POST" action="{{ route('logout') }}" class="inline">
<button type="submit" class="underline text-sm text-gray-600 hover:text-gray-900 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 ms-2">
{{ __('Log Out'}}

I added a fixed height because I don't like the content to shift after initial render.

It's easy, it's automatic!

If you wanna learn more about the confirmation rate with Sniper Link, this blogpost goes deep into the subject.

#laravel #fortify #sniperlink

Syntax highlighting provided by