{"id":20458751,"url":"https://github.com/resend/resend-phoenix-example","last_synced_at":"2025-04-13T05:51:05.582Z","repository":{"id":174872057,"uuid":"649473286","full_name":"resend/resend-phoenix-example","owner":"resend","description":"This example shows how to use Resend with Phoenix","archived":false,"fork":false,"pushed_at":"2024-01-01T10:58:41.000Z","size":337,"stargazers_count":6,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T00:33:11.233Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://resend.com/docs/send-with-phoenix","language":"Elixir","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/resend.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-05T00:09:43.000Z","updated_at":"2025-04-03T16:38:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ee5ee6c-42c3-47b5-8f1b-c6155e70d2f5","html_url":"https://github.com/resend/resend-phoenix-example","commit_stats":null,"previous_names":["resendlabs/resend-phoenix-example","resend/resend-phoenix-example"],"tags_count":0,"template":false,"template_full_name":"resend/resend-template-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resend%2Fresend-phoenix-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resend%2Fresend-phoenix-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resend%2Fresend-phoenix-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/resend%2Fresend-phoenix-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/resend","download_url":"https://codeload.github.com/resend/resend-phoenix-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248670501,"owners_count":21142901,"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":[],"created_at":"2024-11-15T12:13:43.764Z","updated_at":"2025-04-13T05:51:05.560Z","avatar_url":"https://github.com/resend.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Resend with Phoenix\n\nThis example shows how to use Resend with [Phoenix](https://phoenixframework.org/).\n\nCreated using Phoenix [v1.7.3](https://github.com/phoenixframework/phoenix/releases/tag/v1.7.3).\n\n## Prerequisites\n\nTo get the most out of this guide, you’ll need to:\n\n* [Create an API key](https://resend.com/api-keys)\n* [Verify your domain](https://resend.com/domains)\n\n## Setup\n\nAdd `:resend` to your project deps:\n\n```elixir\n  defp deps do\n    [\n      {:resend, \"~\u003e 0.4\"},\n      # ...\n    ]\n  end\n```\n\nOnce added, fetch the new dependency with `mix deps.get`.\n\nConfigure your `App.Mailer` to use the Resend Swoosh adapter by adding the following code\nto [`config/runtime.exs`](./config/runtime.exs):\n\n```elixir\nconfig :app, App.Mailer,\n  adapter: Resend.Swoosh.Adapter,\n  api_key: System.get_env(\"RESEND_KEY\") || \"re_123456789\"\n```\n\nReplace `re_123456789` with your own API key, or fetch it from the environment.\n\nTo start your Phoenix server:\n\n  * Run `mix setup` to install and setup dependencies\n  * Start Phoenix endpoint with `mix phx.server` or inside IEx with `iex -S mix phx.server`\n\nNow you can visit [`localhost:4000`](http://localhost:4000) from your browser.\n\nIf running in `iex`, you can send an email by invoking this function, as an example:\n\n```elixir\niex(1)\u003e App.Users.UserNotifier.deliver_confirmation_instructions(\"recipient@example.com\", \"example.com\")\n```\n\nAlternatively, try creating an account at [`localhost:4000/users/log_in`](http://localhost:4000) to\nreceive a welcome email.\n\nSee [`lib/app/users/user_notifier.ex`](./lib/app/users/user_notifier.ex) for other examples of delivering emails.\n\n## Use with Phx.Gen.Auth\n\nThe above setup works as-is with code generated from [phx_gen_auth](https://hexdocs.pm/phoenix/mix_phx_gen_auth.html),\nPhoenix Framework's built-in auth generator, as demonstrated in this example repo.\n\n## Learn more\n\n  * Official website: https://www.phoenixframework.org/\n  * Guides: https://hexdocs.pm/phoenix/overview.html\n  * Docs: https://hexdocs.pm/phoenix\n  * Forum: https://elixirforum.com/c/phoenix-forum\n  * Source: https://github.com/phoenixframework/phoenix\n\n## License\n\nMIT License","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresend%2Fresend-phoenix-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fresend%2Fresend-phoenix-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fresend%2Fresend-phoenix-example/lists"}