Module: Millionsend::Batch

Defined in:
lib/millionsend/batch.rb

Overview

Send up to 100 emails in a single call.

Class Method Summary collapse

Class Method Details

.send(list, options = {}) ⇒ Object Also known as: create

POST /emails/batch with a bare array body. A trailing options hash carries idempotency_key (no keyword params, matching Emails.send).



9
10
11
12
13
# File 'lib/millionsend/batch.rb', line 9

def send(list, options = {})
  Millionsend::Request.new(
    method: :post, path: "/emails/batch", body: list, idempotency_key: options[:idempotency_key]
  ).perform
end