Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Resend Php Laravel Package

resend/resend-php

Official Resend PHP SDK (PHP 8.1+) for sending emails via the Resend API. Install with Composer, create a client with your API key, and send emails with a simple emails->send() call. Inspired by openai-php.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Unified Email Infrastructure: Replace fragmented email solutions (e.g., Mailgun, SendGrid, or custom SMTP) with a single, scalable API for transactional and marketing emails. Reduces vendor lock-in risk and simplifies compliance (e.g., GDPR, CAN-SPAM) by centralizing email logic in one package.

  • Laravel-Centric Roadmap: Align with Laravel’s ecosystem by adopting a first-party-like SDK for Resend, reducing friction for teams already using Laravel’s Mail system. Enables seamless integration with Laravel’s queues, notifications, and event system (e.g., trigger emails on user.created).

    • Example: Replace Mail::to()->send() with Resend::emails()->send() for transactional emails, while keeping Laravel’s built-in mailers for templated emails.
  • Build vs. Buy for Email Features: Buy for:

    • Transactional emails (password resets, OTPs, receipts).
    • Contact management (segments, topics, properties) for marketing automation.
    • Webhook-driven workflows (e.g., sync email events to a CRM). Build for:
    • Highly customized email templates (use Laravel’s Blade or MJML).
    • Advanced analytics beyond Resend’s native tracking.
  • Use Cases:

    • User Onboarding: Send welcome sequences with dynamic content (e.g., {{user.name}}).
    • Notifications: Real-time alerts (e.g., "Your order is shipped") with tracking links.
    • Marketing Campaigns: Segment-based broadcasts (e.g., "Abandoned cart" emails).
    • Developer Experience: Embed email logic in CLI tools or background jobs (e.g., php artisan resend:digest).

When to Consider This Package

Adopt if:

  • Your stack is PHP 8.1+ (or Laravel 9+) and you need a lightweight, modern SDK for Resend’s API.
  • You prioritize speed of integration over full feature parity with self-hosted solutions (e.g., no need for SMTP server management).
  • Your use case fits Resend’s strengths:
    • High-volume transactional emails (e.g., >10K/month).
    • Need for contact segmentation, webhooks, or email receiving (inbound parsing).
    • Compliance with Resend’s deliverability guarantees (e.g., no blacklists for shared IPs).
  • You’re all-in on Laravel and want to avoid reinventing email logic (e.g., retries, rate limiting, DKIM).

Look elsewhere if:

  • You need advanced templating (e.g., interactive HTML emails with embedded forms). Use Laravel Notifications + a dedicated templating tool (e.g., MJML).
  • Your team requires multi-channel messaging (SMS, push, etc.). Consider Twilio or AWS SNS.
  • You’re locked into a legacy PHP version (<8.1) or framework (e.g., Symfony 2).
  • Cost is unpredictable: Resend’s pricing scales with volume; audit your expected email volume against their tiered model.
  • You need self-hosted control (e.g., for air-gapped environments). Use Postfix + DKIM or Mailu.

How to Pitch It (Stakeholders)

For Executives: *"Resend’s PHP SDK lets us ship email-driven features 3x faster by eliminating SMTP infrastructure. For example:

  • Onboarding emails: Replace a 4-week project (SMTP setup + deliverability testing) with a 2-day integration.
  • Cost savings: Pay only for emails sent (~$1.50/1K vs. $20/month for a self-hosted SMTP server).
  • Scalability: Handle 100K+ emails/month without hiring DevOps for server tuning. This aligns with our [2024 roadmap] to reduce tech debt in user communications while improving deliverability scores."*

For Engineering: *"This is a drop-in replacement for Laravel’s Mail system for transactional emails. Key benefits:

  • Fluent API: $resend->emails->send([...]) mirrors Laravel’s syntax but uses Resend’s high-deliverability infrastructure.
  • Laravel Integration: Works with queues, events, and notifications. Example:
    // Replace:
    Mail::to($user)->send(new OrderShipped($order));
    
    // With:
    Resend::emails()->send([
        'from' => 'orders@yourbrand.com',
        'to' => $user->email,
        'subject' => 'Your order is shipped!',
        'html' => view('emails.order-shipped', ['order' => $order]),
    ]);
    
  • Future-Proof: Supports Resend’s full API (contacts, webhooks, templates) for marketing automation.
  • Maintenance: Actively updated (PHP 8.5 support, bug fixes) with zero dependents, meaning low risk of abandonment. Trade-off: Limited to Resend’s feature set (e.g., no custom SMTP routes), but covers 90% of our needs."*

For Data/Compliance Teams: "Resend handles DKIM, SPF, and DMARC out-of-the-box, reducing our risk of emails landing in spam. Their contact segmentation and webhook events also simplify GDPR compliance (e.g., track opt-outs via contacts.update). We’d retain control over template content but offload deliverability to a trusted provider."

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport