{"id":18783908,"url":"https://github.com/sparkpost/elixir-sparkpost","last_synced_at":"2025-05-06T21:40:58.709Z","repository":{"id":57550895,"uuid":"47347062","full_name":"SparkPost/elixir-sparkpost","owner":"SparkPost","description":"SparkPost client library for Elixir https://developers.sparkpost.com","archived":false,"fork":false,"pushed_at":"2022-11-30T08:52:49.000Z","size":94,"stargazers_count":44,"open_issues_count":10,"forks_count":14,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-04-11T13:25:00.533Z","etag":null,"topics":["elixir","email","sparkpost"],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SparkPost.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-03T17:07:30.000Z","updated_at":"2024-03-26T02:35:32.000Z","dependencies_parsed_at":"2023-01-22T01:59:04.249Z","dependency_job_id":null,"html_url":"https://github.com/SparkPost/elixir-sparkpost","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Felixir-sparkpost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Felixir-sparkpost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Felixir-sparkpost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SparkPost%2Felixir-sparkpost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SparkPost","download_url":"https://codeload.github.com/SparkPost/elixir-sparkpost/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252775563,"owners_count":21802453,"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":["elixir","email","sparkpost"],"created_at":"2024-11-07T20:41:07.925Z","updated_at":"2025-05-06T21:40:58.670Z","avatar_url":"https://github.com/SparkPost.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://www.sparkpost.com\"\u003e\u003cimg src=\"https://www.sparkpost.com/sites/default/files/attachments/SparkPost_Logo_2-Color_Gray-Orange_RGB.svg\" width=\"200px\"/\u003e\u003c/a\u003e\n\n[Sign up](https://app.sparkpost.com/join?plan=free-0817?src=Social%20Media\u0026sfdcid=70160000000pqBb\u0026pc=GitHubSignUp\u0026utm_source=github\u0026utm_medium=social-media\u0026utm_campaign=github\u0026utm_content=sign-up) for a SparkPost account and visit our [Developer Hub](https://developers.sparkpost.com) for even more content.\n\n# SparkPost Elixir Library\n\n[![Travis CI](https://travis-ci.org/SparkPost/elixir-sparkpost.svg?branch=master)](https://travis-ci.org/SparkPost/elixir-sparkpost) [![Coverage Status](https://coveralls.io/repos/SparkPost/elixir-sparkpost/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/SparkPost/elixir-sparkpost?branch=master)\n\nThe official [Elixir](http://elixir-lang.org/) package for the [SparkPost API](https://www.sparkpost.com/api).\n\nCapabilities include:\n - convenience functions for easy \"I just want to send mail\" users\n - advanced functions for unleashing all of Sparkpost's capabilities\n\n## Installation\n\n  1. Add sparkpost and ibrowse to your list of dependencies in `mix.exs`:\n\n  ```elixir\n  def deps do\n    [\n      {:sparkpost, \"~\u003e 0.5.1\"}\n    ]\n  end\n  ```\n\n  2. Ensure sparkpost is started before your application:\n\n  ```elixir\n  def application do\n    [applications: [:sparkpost]]\n  end\n  ```\n\n  3. Update your dependencies:\n\n  ```bash\n  $ mix deps.get\n  ```\n\n## Usage\n\n### Configuration\n\nIn your config/config.exs file:\n\n```elixir\nconfig :sparkpost, api_key: \"YOUR-API-KEY\"\n```\n\n### Option 1: Convenience\n\n```elixir\ndefmodule MyApp.Example do\n  def send_message do\n    SparkPost.send to: \"you@example.com\",\n         from: \"elixir@sparkpostbox.com\",\n         subject: \"Sending email from Elixir is awesome!\",\n         text: \"Hi there!\",\n         html: \"\u003cp\u003eHi there!\u003c/p\u003e\"\n  end\nend\n```\n\n### Option 2: Full SparkPost API\n\n```elixir\ndefmodule MyApp.Example do\n  alias SparkPost.{Content, Recipient, Transmission}\n  \n\tdef send_message do\n    Transmission.send(%Transmission{\n        recipients: [ \"you@example.com\" ],\n        content: %Content.Inline{\n          subject: \"Sending email from Elixir is awesome!\",\n          from: \"elixir@sparkpostbox.com\", \n          text: \"Hi there!\",\n          html: \"\u003cp\u003eHi there!\u003c/p\u003e\"\n        }\n    })\n  end\nend\n```\n\nStart your app and send a message:\n\n```bash\n    $ iex -S mix\n    iex\u003e MyApp.Example.send_message\n    {:ok, ...}\n```\n\n### Contribute\n\nWe welcome your contributions!  See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to help out.\n\n### Change Log\n\n[See ChangeLog here](CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkpost%2Felixir-sparkpost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsparkpost%2Felixir-sparkpost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsparkpost%2Felixir-sparkpost/lists"}