To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratordeliver email asyncronously with delayed_job
As an action mailer 3 and delayed_job user
I want to deliver email asyncronously transparently
in order to avoid updating the existing syncronous codebase
This is the current delayed job recommended syntax to run asyncronous
email delivers:
without delayed_job:
Notifier.signup(@user).deliver
with delayed_job:
Notifier.delay.signup(@user)
The syntax is quite different, so if you have a big codebase that doesn't use
yet delayed job it could become rather nasty to replace all the deliver calls.
This gem allows you to keep the old interface and still get the delayed job
asyncronous functionality.
- Scenarios
-
- Email is enqueued successfully
-
- Given
-
I have the following action mailer class:
class TestMailer < ActionMailer::Base def test(recipient) mail to: recipient, from: '[email protected]', subject: 'async email' end end
- When
-
I try to send a test email with the following code:
TestMailer.test('[email protected]').deliver
- Then
- a delayed job object should be returned
- And
- I should see a new delayed_job record in the table
- And
- the email queue should be empty
Last published almost 7 years ago by spaghetticode.