emails-templates

Creates and maintains Blade transactional email templates for Laravel notifications.

Updated May 5, 2025
One-click install
npx skills add https://github.com/sebauvray/toollab-api --skill emails-templates-sebauvray
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: emails-templates
Source: https://github.com/sebauvray/toollab-api/tree/main/.claude/skills/emails-templates
Command: npx skills add https://github.com/sebauvray/toollab-api --skill emails-templates-sebauvray

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Building transactional emails that render correctly across mail clients like Gmail and Outlook is error-prone: inline SVG logos break, links point to the wrong host, nullable user names produce broken greetings, and queued notifications silently never send. This Skill encodes the Toollab project's proven conventions for its six Blade email templates so new or modified emails work the first time. ## Core Features & Use Cases - Template conventions: Enforces the required HTML structure (600px width, <style> in head, #343C6A button, inline color: white), the hosted PNG logo partial (never SVG), and French-language content rules. - Link and variable handling: Distinguishes app.url (API, for images) from app.frontend_url (clickable links), mandates urlencode() on emails, and handles nullable first_name/last_name. - Testing workflow: Guides verification in Maildev, including running queue:work since 5 of 6 notifications implement ShouldQueue. - Use Case: When adding a new transactional notification (e.g., an enrollment confirmation), follow the checklist to copy the staff-invitation structure, wire the logo partial, build front URLs correctly, and verify rendering in Maildev. ## Quick Start Create a new transactional email template for the payment reminder notification following the emails-templates conventions and verify it in Maildev.

Frequently Asked Questions about emails-templates

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a transactional email template in Laravel Blade?▼

Copy the structure of an existing template like staff-invitation: a 600px container, styles in the head, the logo partial in the header, and a #343C6A action button. Render it from toMail() with ->view('emails.xxx', [...]) rather than Laravel's default markdown mail.

Why is my email logo not showing in Gmail or Outlook?▼

Gmail and Outlook do not render inline SVG, so the logo must be a hosted PNG served from an absolute URL built on config('app.url'). If APP_URL is misconfigured in production, the logo breaks in all emails even though the app works.

How do I test Laravel notification emails locally with Maildev?▼

Start the dev environment with docker compose up -d, which includes a Maildev container with a UI at http://localhost:1080. Trigger the notification, then run php artisan queue:work --once since most notifications are queued and will not send without a worker.

Why are my Laravel queued notifications not being sent?▼

Five of the six notifications implement ShouldQueue, so without a running queue worker they never leave the queue. Run php artisan queue:work --once to drain pending jobs or queue:listen for a continuous worker; only the password reset notification is synchronous.

How do I handle nullable user names in email greetings?▼

The users table allows null first_name and last_name for invitations. Use the pattern trim(($notifiable->first_name ?? '').' '.($notifiable->last_name ?? '')) ?: $notifiable->email so the greeting falls back to the email address instead of showing an empty name.