sendpost_rb_sdk
Sendpost - the Ruby gem for the SendPost API
Email API and SMTP relay to not just send and measure email sending, but also alert and optimise. We provide you with tools, expertise and support needed to reliably deliver emails to your customers inboxes on time, every time.
Installation
gem install sendpost_rb_sdk-1.0.0.gem
Getting Started
Please follow the installation procedure and then run the following code:
require 'sendpost_rb_sdk'
api_instance = Sendpost::EmailApi.new
x_sub_account_api_key = 'your_api_key' # String | Sub-Account API Key
= Sendpost::EmailMessage.new
.from = {
email: '[email protected]'
}
.to = [{
email: '[email protected]'
}]
.subject = 'Hello World'
.html_body = '<strong>it works!</strong>'
.ippool = 'PiedPiper'
opts = {
email_message: # EmailMessage | Email message
}
begin
result = api_instance.send_email(x_sub_account_api_key, opts)
p result
rescue Sendpost::ApiError => e
puts "Exception when calling EmailApi->send_email: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://api.sendpost.io/api/v1
Class | Method | HTTP request | Description |
---|---|---|---|
Sendpost::EmailApi | send_email | POST /subaccount/email/ | |
Sendpost::EmailApi | send_email_with_template | POST /subaccount/email/template |
Documentation for Models
- Sendpost::Attachment
- Sendpost::City
- Sendpost::CopyTo
- Sendpost::Device
- Sendpost::EmailMessage
- Sendpost::EmailResponse
- Sendpost::EventMetadata
- Sendpost::From
- Sendpost::Os
- Sendpost::QEmailMessage
- Sendpost::QEvent
- Sendpost::ReplyTo
- Sendpost::To
- Sendpost::UserAgent
- Sendpost::WebhookEvent
Documentation for Authorization
Endpoints do not require authorization.