GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - sendable/sendable-ruby: Sendable client for Ruby.

BranchesTags
Open more actions menu

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
bin
bin
 
 
lib
lib
 
 
spec
spec
 
 
.gitignore
.gitignore
 
 
.rspec
.rspec
 
 
.travis.yml
.travis.yml
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
Gemfile
Gemfile
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
sendable.gemspec
sendable.gemspec
 
 

Repository files navigation

Sendable

Ruby library for sending email via the Sendable REST API.

sendable.io

Installation

Add this line to your application's Gemfile:

gem 'sendable'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sendable

Configuration

Sendable.config do |config|
  config.api_key = 'YOUR API KEY'
end

Usage

Render

Returns the rendered HTML for your template.

render arguments

  • template - string - Your email template's id
  • params - hash - Object containing the following keys
    • data - hash - Any email template data that will replace the email template variables
result = Sendable.client.render(1, {
  data: {
    first_name: 'John',
    age: 28
  }
})

render response

{
  success: true,
  email: {
    html: "<html><head></head><body><h1>Sample HTML</h1></body></html>",
    plain: "Sample Plain Text",
    subject: "Sample Subject",
    preheader: "Sample Preheader"
  }
}

Email

Sends the email using your configured SMTP mailer in Sendable.

email arguments

  • template - string - Your email template's id
  • params - hash - Object containing the following keys
    • to - string - This is the recipient's email address
    • from - string - This is the sender's email address
    • data - hash - Any email template data that will replace the email template variables
result = Sendable.client.email(1, {
  to: '[email protected]',
  from: '[email protected]',
  data: {
    first_name: 'John',
    age: 28
  }
})

email response

{
  success: true,
  email: {
    html: "<html><head></head><body><h1>Sample HTML</h1></body></html>",
    plain: "Sample Plain Text",
    subject: "Sample Subject",
    preheader: "Sample Preheader"
  },
  delivery: {}
}

The delivery key will include the response from your ESP.

License

The gem is available as open source under the terms of the MIT License.

About

Sendable client for Ruby.

Resources

Readme
MIT license

Code of conduct

Code of conduct
Activity
Custom properties

Stars

0 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.