{"id":19000982,"url":"https://github.com/pepipost/pepipost-sdk-ruby","last_synced_at":"2025-04-22T17:08:32.304Z","repository":{"id":56887785,"uuid":"56591320","full_name":"pepipost/pepipost-sdk-ruby","owner":"pepipost","description":"Official repository of the Pepipost SDK for Ruby","archived":false,"fork":false,"pushed_at":"2020-09-02T14:48:15.000Z","size":323,"stargazers_count":2,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-11T05:46:52.227Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pepipost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-19T11:33:33.000Z","updated_at":"2021-07-23T18:54:06.000Z","dependencies_parsed_at":"2022-08-21T00:50:49.208Z","dependency_job_id":null,"html_url":"https://github.com/pepipost/pepipost-sdk-ruby","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepipost%2Fpepipost-sdk-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepipost%2Fpepipost-sdk-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepipost%2Fpepipost-sdk-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepipost%2Fpepipost-sdk-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pepipost","download_url":"https://codeload.github.com/pepipost/pepipost-sdk-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250285695,"owners_count":21405297,"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-08T18:09:28.494Z","updated_at":"2025-04-22T17:08:32.237Z","avatar_url":"https://github.com/pepipost.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"![pepipostlogo](https://pepipost.com/wp-content/uploads/2017/07/P_LOGO.png)\r\n\r\n[![Gem Version](https://badge.fury.io/rb/pepipost_gem.svg)](https://badge.fury.io/rb/pepipost_gem)\r\n[![Open Source Helpers](https://www.codetriage.com/pepipost/pepipost-sdk-ruby/badges/users.svg)](https://www.codetriage.com/pepipost/pepipost-sdk-ruby)\r\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.txt)\r\n[![Twitter Follow](https://img.shields.io/twitter/follow/pepi_post.svg?style=social\u0026label=Follow)](https://twitter.com/pepi_post)\r\n\r\n# Ruby SDK :gem: for [Pepipost](http://www.pepipost.com/?utm_campaign=GitHubSDK\u0026utm_medium=GithubSDK\u0026utm_source=GithubSDK)\r\n\r\nThis gem contains methods for easily interacting with the Pepipost Email Sending API to send emails within few seconds.\r\n\r\nWe are trying to make our libraries a Community Driven. To help us building right things in proper order we would request you to help us by sharing comments, creating new issues or pull request.\r\n\r\n## Table of Content\r\n* [Installation](#installation)\r\n* [Quick Start](#quickstart)\r\n* [Sample Example](#steps)\r\n* [Announcements](#announcements)\r\n* [Roadmap](#roadmap)\r\n* [About](#about)\r\n* [License](#license)\r\n\r\n\r\n\u003ca name=\"installation\"\u003e\u003c/a\u003e\r\n## Installation \r\n\r\n### Manually generate your own pepipost gem \r\n\r\nThis client library is a Ruby gem which can be compiled and used in your Ruby on Rails project. This library requires a few gems from the RubyGems repository.\r\n\r\n* Open the command line interface/terminal and navigate to the folder of your choice and run the below commands to download and navigate to the downloaded folder:\r\n``` git clone https://github.com/pepipost/pepipost-sdk-ruby.git ```\r\n* ``` cd pepipost-sdk-ruby ``` \r\n\r\n* ``` gem build pepipost.gemspec ``` to build the gem.\r\n* ``` gem install pepipost-5.0.0.gem ``` to install pepipost gem\r\n\r\n![Building Gem](https://apidocs.io/illustration/ruby?step=buildSDK\u0026workspaceFolder=pepipost-Ruby\u0026workspaceName=pepipost-Ruby\u0026projectName=pepipost_gem\u0026gemName=pepipost\u0026gemVer=5.0.0)\r\n\r\nOnce pepipost_gem is installed, use the sample example to [send test email](#steps). \r\n\r\n\u003ca name=\"quickstart\"\u003e\u003c/a\u003e\r\n## Quickstart\r\n\r\nThe following section explains how to use the Pepipost Gem in a new Rails project using RubyMine.\r\n\r\nThe basic workflow presented here is also applicable if you prefer using a different editor or IDE.\r\n\r\n1. Starting a new project\r\n\r\n   Close any existing projects in RubyMine by selecting:\r\n\r\n   * ``` File -\u003e Close Project ``` \r\n   * Next, click on ``` Create New Project ``` to create a new project from scratch.\r\n\r\n   ![Create a new project in RubyMine](https://apidocs.io/illustration/ruby?step=createNewProject0\u0026workspaceFolder=pepipost_gem-Ruby\u0026workspaceName=PepipostGem\u0026projectName=pepipost_gem\u0026gemName=pepipost_gem\u0026gemVer=2.5.0)\r\n\r\n   * Next, provide ``` TestApp ``` as the project name.\r\n   * Choose ``` Rails Application ``` as the project type.\r\n   * Click ``` OK ```.\r\n\r\n   ![Create a new Rails Application in RubyMine - step 1](https://apidocs.io/illustration/ruby?step=createNewProject1\u0026workspaceFolder=pepipost_gem-Ruby\u0026workspaceName=PepipostGem\u0026projectName=pepipost_gem\u0026gemName=pepipost_gem\u0026gemVer=2.5.0)\r\n\r\n     In the next dialog make sure that correct *Ruby SDK* is being used (minimum 2.0.0) \r\n   * click ``` OK ```.\r\n\r\n   ![Create a new Rails Application in RubyMine - step 2](https://apidocs.io/illustration/ruby?step=createNewProject2\u0026workspaceFolder=pepipost_gem-Ruby\u0026workspaceName=PepipostGem\u0026projectName=pepipost_gem\u0026gemName=pepipost_gem\u0026gemVer=2.5.0)\r\n\r\n   This will create a new Rails Application project with an existing set of files and folder.\r\n\r\n2. Add reference of the gem\r\n   \r\n   * In order to use the Pepipost gem in the new project, add a gem reference.\r\n   * Locate the ```Gemfile``` in the *Project Explorer* window under the ``` TestApp ``` project node.\r\n   * The file contains references to all gems being used in the project. Here, add the reference to the library gem by adding the following line:\r\n    ``` gem 'pepipost_gem', '~\u003e 2.5.0' ```\r\n\r\n   ![Add references of the Gemfile](https://apidocs.io/illustration/ruby?step=addReference\u0026workspaceFolder=pepipost_gem-Ruby\u0026workspaceName=PepipostGem\u0026projectName=pepipost_gem\u0026gemName=pepipost_gem\u0026gemVer=2.5.0)\r\n\r\n3. Adding a new Rails Controller\r\n\r\n   * Once the ``` TestApp ``` project is created.\r\n   * Folder named ``` controllers ``` will be visible in the *Project Explorer* under the following path:\r\n     ``` TestApp \u003e app \u003e controllers ```. \r\n   * Right click on this folder.\r\n   * select ``` New -\u003e Run Rails Generator ```.\r\n\r\n   ![Run Rails Generator on Controllers Folder](https://apidocs.io/illustration/ruby?step=addCode0\u0026workspaceFolder=pepipost_gem-Ruby\u0026workspaceName=PepipostGem\u0026projectName=pepipost_gem\u0026gemName=pepipost_gem\u0026gemVer=2.5.0)\r\n\r\n   * Selecting the said option will popup a small window where the generator names are displayed.\r\n   * select the ``` controller ``` template.\r\n\r\n   ![Create a new Controller](https://apidocs.io/illustration/ruby?step=addCode1\u0026workspaceFolder=pepipost_gem-Ruby\u0026workspaceName=PepipostGem\u0026projectName=pepipost_gem\u0026gemName=pepipost_gem\u0026gemVer=2.5.0)\r\n\r\n   * A  popup window will ask you for a Controller name and included Actions.\r\n   * For controller name provide ``` Hello ```.\r\n   * Include an action named ``` Index ```. \r\n   * Click ``` OK ```.\r\n\r\n   ![Add a new Controller](https://apidocs.io/illustration/ruby?step=addCode2\u0026workspaceFolder=pepipost_gem-Ruby\u0026workspaceName=PepipostGem\u0026projectName=pepipost_gem\u0026gemName=pepipost_gem\u0026gemVer=2.5.0)\r\n\r\n   * A new controller class anmed ``` HelloController ``` will be created in a file named ``` hello_controller.rb ``` containing a method named ``` Index ```.\r\n   * In this method, copy [sample example](#steps).\r\n   * Run your project.\r\n\r\n   ![Initialize the library](https://apidocs.io/illustration/ruby?step=addCode3\u0026workspaceFolder=pepipost_gem-Ruby\u0026workspaceName=PepipostGem\u0026projectName=pepipost_gem\u0026gemName=pepipost_gem\u0026gemVer=2.5.0)\r\n\r\n\u003ca name=\"steps\"\u003e\u003c/a\u003e\r\n## Usage\r\n\r\n```ruby\r\nrequire 'pepipost'\r\nrequire 'json'\r\n\r\ninclude Pepipost\r\n\r\napi_key = 'Your api_key here'\r\n\r\nclient = PepipostClient.new(api_key: api_key)\r\n\r\nmail_send_controller = client.mail_send\r\n\r\nbody = Send.new\r\n\r\nbody.from = From.new\r\n\r\nbody.from.email = 'hello@your-register-domain-with-pepipost'\r\nbody.from.name = 'Example Pepi'\r\nbody.subject = 'Emailing with Pepipost is easy'\r\nbody.content = []\r\n\r\nbody.content[0] = Content.new\r\n\r\nbody.content[0].type = TypeEnum::HTML\r\nbody.content[0].value = '\u003chtml\u003e\u003cbody\u003eHey,\u003cbr\u003e\u003cbr\u003eDo you know integration is even simpler in Pepipost, \u003cbr\u003ewith Ruby \u003cbr\u003e Happy Mailing ! \u003cbr\u003e\u003cbr\u003ePepipost \u003c/body\u003e\u003c/html\u003e'\r\n\r\n\r\nbody.personalizations = []\r\n\r\nbody.personalizations[0] = Personalizations.new\r\n\r\nbody.personalizations[0].to = []\r\n\r\nbody.personalizations[0].to[0] = EmailStruct.new\r\n\r\nbody.personalizations[0].to[0].name = 'random-1'\r\nbody.personalizations[0].to[0].email = 'random-1@mydomain.name'\r\n\r\nbegin\r\n  result = mail_send_controller.create_generatethemailsendrequest(body)\r\n  puts (result)\r\nrescue APIException =\u003e ex\r\n  puts \"Caught APIException: #{ex.message}\"\r\nend\r\n\r\n```\r\n\r\n* Change your api-key and sending domain respectively\r\n  * **apikey** will be available under Login to Pepipost -\u003e Settings -\u003e Integration  \r\n  * **Sending Domain** will be available under Login to Pepiost -\u003e Settings -\u003e Sending Domains \r\n  \r\n```\r\n  *Note :: Domains showing with Active status on Sending Domain dashboard are only allowed to send any sort of emails.* In case there are no Sending Domain added under your account, then first add the domain, get the DNS (SPF/DKIM) settings done and get it reviewed by our compliance team for approval. Once the domain is approved, it will be in ACTIVE status and will be ready to send any sort of emails. \r\n```\r\n* Save above file as sendEmail.rb\r\n* run ``` ruby sendEmail.rb ```\r\n\r\n\u003ca name=\"announcements\"\u003e\u003c/a\u003e\r\n# Announcements\r\n\r\nv5.0 has been released! Please see the [release notes](https://github.com/pepipost/pepipost-sdk-ruby/releases/) for details.\r\n\r\nAll updates to this library are documented in our [releases](https://github.com/pepipost/pepipost-sdk-ruby/releases). For any queries, feel free to reach out us at dx@pepipost.com\r\n\r\n\u003ca name=\"roadmap\"\u003e\u003c/a\u003e\r\n## Roadmap\r\n\r\nIf you are interested in the future direction of this project, please take a look at our open [issues](https://github.com/pepipost/pepipost-sdk-ruby/issues) and [pull requests](https://github.com/pepipost/pepipost-sdk-ruby/pulls). We would love to hear your feedback.\r\n\r\n\u003ca name=\"about\"\u003e\u003c/a\u003e\r\n## About\r\npepipost-sdk-ruby library is guided and supported by the [Pepipost Developer Experience Team](https://github.com/orgs/pepipost/teams/pepis/members) .\r\nThis pepipost gem is maintained and funded by Pepipost Ltd. The names and logos for pepipost gem are trademarks of Pepipost Ltd.\r\n\r\n\u003ca name=\"license\"\u003e\u003c/a\u003e\r\n## License\r\nThis code library was semi-automatically generated by APIMATIC v2.0 and licensed under The MIT License (MIT).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepipost%2Fpepipost-sdk-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpepipost%2Fpepipost-sdk-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepipost%2Fpepipost-sdk-ruby/lists"}