{"id":13514615,"url":"https://github.com/fgrehm/letter_opener_web","last_synced_at":"2025-05-14T09:08:11.221Z","repository":{"id":6209387,"uuid":"7440432","full_name":"fgrehm/letter_opener_web","owner":"fgrehm","description":"A web interface for browsing Ruby on Rails sent emails","archived":false,"fork":false,"pushed_at":"2024-05-19T12:05:59.000Z","size":744,"stargazers_count":689,"open_issues_count":9,"forks_count":105,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-05-22T19:31:43.639Z","etag":null,"topics":["development","email","inbox","rails"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fgrehm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2013-01-04T13:09:14.000Z","updated_at":"2024-06-18T12:18:33.551Z","dependencies_parsed_at":"2024-01-13T01:39:56.512Z","dependency_job_id":"b996ce3f-4989-4f90-938f-b90a12e0bcf1","html_url":"https://github.com/fgrehm/letter_opener_web","commit_stats":{"total_commits":236,"total_committers":29,"mean_commits":8.137931034482758,"dds":0.364406779661017,"last_synced_commit":"026d5e0594221143126b9118222aa458eb8f4e3c"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrehm%2Fletter_opener_web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrehm%2Fletter_opener_web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrehm%2Fletter_opener_web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fgrehm%2Fletter_opener_web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fgrehm","download_url":"https://codeload.github.com/fgrehm/letter_opener_web/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248154965,"owners_count":21056541,"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","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":["development","email","inbox","rails"],"created_at":"2024-08-01T05:00:58.898Z","updated_at":"2025-04-10T03:43:35.484Z","avatar_url":"https://github.com/fgrehm.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"# letter_opener_web\n\n![Build Status](https://github.com/fgrehm/letter_opener_web/actions/workflows/main.yml/badge.svg)\n[![Gem Version](https://badge.fury.io/rb/letter_opener_web.svg)](http://badge.fury.io/rb/letter_opener_web)\n[![Code Climate](https://codeclimate.com/github/fgrehm/letter_opener_web.svg)](https://codeclimate.com/github/fgrehm/letter_opener_web)\n\nGives [letter_opener](https://github.com/ryanb/letter_opener) an interface for\nbrowsing sent emails.\n\n## Installation\n\nFirst add the gem to your development environment and run the `bundle` command to install it.\n\n```ruby\ngroup :development do\n  gem 'letter_opener_web', '~\u003e 3.0'\nend\n```\n\n## Usage\n\nAdd to your `routes.rb`:\n\n```ruby\nYour::Application.routes.draw do\n  mount LetterOpenerWeb::Engine, at: \"/letter_opener\" if Rails.env.development?\nend\n```\n\nAnd make sure you have [`:letter_opener` delivery method](https://github.com/ryanb/letter_opener#rails-setup)\nconfigured for your app. Then visit `http://localhost:3000/letter_opener` after\nsending an email and have fun.\n\nIf you are running the app from a [Vagrant](http://vagrantup.com) machine or Docker\ncontainer, you might want to skip `letter_opener`'s `launchy` calls and avoid messages\nlike these:\n\n```terminal\n12:33:42 web.1  | Failure in opening /vagrant/tmp/letter_opener/1358825621_ba83a22/rich.html\nwith options {}: Unable to find a browser command. If this is unexpected, Please rerun with\nenvironment variable LAUNCHY_DEBUG=true or the '-d' commandline option and file a bug at\nhttps://github.com/copiousfreetime/launchy/issues/new\n```\n\nIn that case (or if you really just want to browse mails using the web interface and\ndon't care about opening emails automatically), you can set `:letter_opener_web` as\nyour delivery method on your `config/environments/development.rb`:\n\n```ruby\nconfig.action_mailer.delivery_method = :letter_opener_web\n```\n\nIf you're using `:letter_opener_web` as your delivery method, you can change the location of\nthe letters by adding the following to an initializer (or in `development.rb`):\n\n```ruby\nLetterOpenerWeb.configure do |config|\n  config.letters_location = Rails.root.join('your', 'new', 'path')\nend\n```\n\n## Usage on pre-production environments\n\nSome people use this gem on staging / pre-production environments to avoid having real emails\nbeing sent out. To set that up you'll need to:\n\n1. Move the gem out of the `development` group in your `Gemfile`\n2. Set `config.action_mailer.delivery_method` on the appropriate `config/environments/\u003cenv\u003e.rb`\n3. Enable the route for the environments on your `routes.rb`.\n\nIn other words, your `Gemfile` will have:\n\n```ruby\ngem 'letter_opener_web'\n```\n\nAnd your `routes.rb`:\n\n```ruby\nYour::Application.routes.draw do\n  # If you have a dedicated config/environments/staging.rb\n  mount LetterOpenerWeb::Engine, at: \"/letter_opener\" if Rails.env.staging?\n\n  # If you use RAILS_ENV=production in staging environments, you'll need another\n  # way to disable it in \"real production\"\n  mount LetterOpenerWeb::Engine, at: \"/letter_opener\" unless ENV[\"PRODUCTION_FOR_REAL\"]\nend\n```\n\n**NOTICE: Using this gem on Heroku will only work if your app has just one Dyno\nand does not send emails from background jobs. For updates on this matter please\nsubscribe to [GH-35](https://github.com/fgrehm/letter_opener_web/issues/35)**\n\n## Acknowledgements\n\nSpecial thanks to [@alexrothenberg](https://github.com/alexrothenberg) for some\nideas on [this pull request](https://github.com/ryanb/letter_opener/pull/12) and\n[@pseudomuto](https://github.com/pseudomuto) for keeping the project alive for a\nfew years.\n\n## Contributing\n\n1. Fork it and run `bin/setup`\n2. Create your feature branch (`git switch -c my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgrehm%2Fletter_opener_web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffgrehm%2Fletter_opener_web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffgrehm%2Fletter_opener_web/lists"}