README.md in mailersend-ruby-0.2.3 vs README.md in mailersend-ruby-0.2.4

- old
+ new

@@ -11,10 +11,13 @@ - [Send an email](#send-an-email) - [Add CC, BCC recipients](#add-cc-bcc-recipients) - [Send a template-based email](#send-a-template-based-email) - [Advanced personalization](#advanced-personalization) - [Simple personalization](#simple-personalization) + - [Bulk Email](#bulk-email) + - [Send bulk email](#send-bulk-email) + - [Get bulk email status](#get-bulk-email-status) - [Tokens](#tokens) - [Create a token](#create-a-token) - [Update a token](#update-a-token) - [Delete a token](#delete-a-token) - [Send email with attachment](#send-email-with-attachment) @@ -185,9 +188,45 @@ } ms_email.add_variables(variables) ms_email.send +``` + +## Bulk Email + +### Send bulk email +```ruby +require "mailersend-ruby" + +ms_bulk_email = Mailersend::BulkEmail.new + +ms_bulk_email.messages = [ + { + 'from' => {"email" => "april@parksandrec.com", "name" => "April"}, + 'to' => [{"email" => "ron@parksandrec.com", "name" => "Ron"}], + 'subject' => "Time", + 'text' => "Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.", + 'html' => "<b>Time is money, money is power, power is pizza, and pizza is knowledge. Let's go.</b>", + }, + { + 'from' => {"email" => "april@parksandrec.com", "name" => "April"}, + 'to' => [{"email" => "leslie@parksandrec.com", "name" => "Leslie"}], + 'subject' => "Lorem Ipsum", + 'text' => "Lorem ipsum dolor sit amet, consectetur adipiscing elit.", + 'html' => "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>", + } +] + +ms_bulk_email.send +``` + +### Get bulk email status +```ruby +require "mailersend-ruby" + +ms_bulk_email = Mailersend::BulkEmail.new +ms_bulk_email.get_bulk_status(bulk_email_id: 'yourbulkemailid') ``` ## Tokens ### Create a token \ No newline at end of file