{"id":18728810,"url":"https://github.com/rubyonworld/action-mailer-queue","last_synced_at":"2025-07-25T17:06:53.548Z","repository":{"id":174007816,"uuid":"540192391","full_name":"RubyOnWorld/action-mailer-queue","owner":"RubyOnWorld","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-22T22:33:00.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T20:33:02.801Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RubyOnWorld.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-22T22:32:42.000Z","updated_at":"2022-09-22T22:33:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"8ca5f2c3-01c2-4068-8726-325b3fcaf773","html_url":"https://github.com/RubyOnWorld/action-mailer-queue","commit_stats":null,"previous_names":["rubyonworld/action-mailer-queue"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RubyOnWorld/action-mailer-queue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Faction-mailer-queue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Faction-mailer-queue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Faction-mailer-queue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Faction-mailer-queue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubyOnWorld","download_url":"https://codeload.github.com/RubyOnWorld/action-mailer-queue/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Faction-mailer-queue/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267037505,"owners_count":24025600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T14:24:26.048Z","updated_at":"2025-07-25T17:06:53.475Z","avatar_url":"https://github.com/RubyOnWorld.png","language":"Ruby","readme":"ActionMailer::Queue\n===================\n\nStore emails into ActiveRecord\n\nAuthor\n======\n\nAndrew Beam\nKRAXNET s.r.o.\n\nExample\n=======\n\nclass Notification \u003c ActionMailer::Queue\n  \n  def test\n  end\n\nend\n\nNew mail\n--------\nmail = Notification.deliver_test\nmail.class # =\u003e TMail::Mail\nmail.queue_id # =\u003e 1\n\nNotification.queue # =\u003e ActionMailer::Queue::Store =\u003e ActiveRecord::Base\n\nDeliver mail\n------------\nmail = Notification.queue.find(1)\nmail.class # =\u003e ActionMailer::Queue::Store\nmail.deliver! # =\u003e false || TMail::Mail\n\nif mail.deliver! == false \n  mail.last_error # String (Error.to_s) \n  mail.last_attempt_at # Datetime\n  mail.tries # =\u003e 1\nelse \n  mail.sent # =\u003e true\n  mail.message_id # String\n  mail.sent_at # Datetime\nend\n\nProcess queue\n-------------\nNotification.queue.process! # { :limit =\u003e 100 } use scope for_send and with_processing_rules\n\n\nSettings\n--------\nActionMailer::Queue.delivery_method = :action_mailer_queue\n\nActionMailer::Queue.limit_for_processing = 100\n# - limit for Notification.queue.process!\n\nActionMailer::Queue.max_tries_in_process = 5\n# - trying send mail only X times (with delay between attempt)\n\nActionMailer::Queue.delay_between_attempt_in_process = 240 # [minutes]\n# - delay between attempt after previous attempt failed\n\nActionMailer::Queue.destroy_message_after_deliver = false\n# - delete message from database after mail deliver\n\nQueue scopes\n------------\nNotification.queue.for_send # emails for send\nNotification.queue.already_sent # emails already sent\nNotification.queue.with_processing_rules # apply processing rules\nNotification.queue.with_error # emails with more tries\nNotification.queue.without_error # emails with 0 tries","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Faction-mailer-queue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyonworld%2Faction-mailer-queue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Faction-mailer-queue/lists"}