Skip to content

Conversation

@eelcoj
Copy link
Collaborator

@eelcoj eelcoj commented Jun 10, 2025

Closes: #1

Introduces background email delivery using ActiveJob:

  • New deliver_later method that queues via ActiveJob
  • Class-level enqueue method for configuring queue options (queue, wait, priority)
  • Custom error handling with BackgroundDeliveryError

Usage:

class OrderEmail < Courrier::Email 
  enqueue queue: "emails", wait: 5.minutes
  # …
end

OrderEmail.deliver_later to: "[email protected]"

  • Base logic
  • Add tests (+ fix current fail)
  • Update README

eelcoj added 5 commits June 10, 2025 13:23
Introduces background email delivery using ActiveJob:
- New deliver_later method that queues via ActiveJob
- Class-level enqueue method for configuring queue options (queue, wait, priority)
- Custom error handling with BackgroundDeliveryError

Usage:
  class OrderEmail < Courrier::Email
    enqueue queue: "emails", wait: 5.minutes
  end

  OrderEmail.deliver_later to: "[email protected]"
@eelcoj eelcoj merged commit 84abe65 into main Jun 30, 2025
1 check passed
@eelcoj eelcoj deleted the deliver-later branch June 30, 2025 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

First-party support for background jobs

2 participants