Skip to content

Conversation

shashankmehra
Copy link

Breaking changes addressed

Action Mailer exception

In ActionMailer 7.1+ the following call throws an exception:

ActionMailer::MailDeliveryJob.new.queue_name

This is because MailDeliveryJob accepts the Mailer as the first argument and uses the mailer dynamically to get the queue name using deliver_later_queue_name. So, calling queue_name without passing the arguments throws an exception.

The only way to pass arguments is to call perform_later - which we cannot do just to get queue_name.

This was solved by adding special handling for MailDeliveryJob. We use deliver_later_queue_name from the mailer itself to get the queue name - same as MailDeliveryJob.

Checklist

  • Make sure existing tests pass
  • Write tests for expanded functionality of Mailer specific queue
  • Update Changelog

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.

1 participant