Skip to content

Commit d9d9f34

Browse files
Updated README
1 parent dfccfa1 commit d9d9f34

File tree

1 file changed

+32
-31
lines changed

1 file changed

+32
-31
lines changed

README.MD

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![SocketLabs](https://static.socketlabs.com/logos/logo-dark-326x64.png)](https://www.socketlabs.com/developers)
1+
[![SocketLabs](https://static.socketlabs.com/logos/logo-dark-326x64.png)](https://www.socketlabs.com/developers)
22
# [![Twitter Follow](https://img.shields.io/twitter/follow/socketlabs.svg?style=social&label=Follow)](https://twitter.com/socketlabs) [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/socketlabs/socketlabs-nodejs/blob/master/CONTRIBUTING.md)
33

44
The SocketLabs Email Delivery Ruby library allows you to easily send email messages via the [SocketLabs Injection API](https://www.socketlabs.com/docs/inject/). The library makes it easy to build and send any type of message supported by the API, from a simple message to a single recipient all the way to a complex bulk message sent to a group of recipients with unique merge data per recipient.
@@ -30,7 +30,7 @@ And then execute:
3030
Install it yourself as:
3131

3232
$ gem install socketlabs-injectionapi
33-
33+
3434
Or From git
3535

3636
$ gem 'socketlabs-injectionapi', :git => "https://github.com/socketlabs/socketlabs-ruby.git"
@@ -41,21 +41,21 @@ For more information please see the [Installing Gems](https://guides.rubygems.or
4141
<a name="getting-started" id="getting-started"></a>
4242
# Getting Started
4343
## Obtaining your API Key and SocketLabs ServerId number
44-
In order to get started, you'll need to enable the Injection API feature in the [SocketLabs Control Panel](https://cp.socketlabs.com).
45-
Once logged in, navigate to your SocketLabs server's dashboard (if you only have one server on your account you'll be taken here immediately after logging in).
46-
Make note of your 4 or 5 digit ServerId number, as you'll need this along with
47-
your API key in order to use the Injection API.
44+
In order to get started, you'll need to enable the Injection API feature in the [SocketLabs Control Panel](https://cp.socketlabs.com).
45+
Once logged in, navigate to your SocketLabs server's dashboard (if you only have one server on your account you'll be taken here immediately after logging in).
46+
Make note of your 4 or 5 digit ServerId number, as you'll need this along with
47+
your API key in order to use the Injection API.
4848

49-
To enable the Injection API, click on the "For Developers" dropdown on the top-level navigation, then choose the "Configure HTTP Injection API" option.
49+
To enable the Injection API, click on the "For Developers" dropdown on the top-level navigation, then choose the "Configure HTTP Injection API" option.
5050
Once here, you can enable the feature by choosing the "Enabled" option in the
51-
dropdown. Enabling the feature will also generate your API key, which you'll
52-
need (along with your ServerId) to start using the API. Be sure to click the
51+
dropdown. Enabling the feature will also generate your API key, which you'll
52+
need (along with your ServerId) to start using the API. Be sure to click the
5353
"Update" button to save your changes once you are finished.
5454

5555

5656
## Basic Message
57-
A basic message is an email message like you'd send from a personal email client such as Outlook.
58-
A basic message can have many recipients, including multiple To addresses, CC addresses, and even BCC addresses.
57+
A basic message is an email message like you'd send from a personal email client such as Outlook.
58+
A basic message can have many recipients, including multiple To addresses, CC addresses, and even BCC addresses.
5959
You can also send a file attachment in a basic message.
6060

6161
```ruby
@@ -72,7 +72,7 @@ message.plain_text_body = "This is the Plain Text Body of my message."
7272

7373
message.from_email_address = EmailAddress.new("[email protected]")
7474

75-
# A basic message supports up to 50 recipients
75+
# A basic message supports up to 50 recipients
7676
# and supports several different ways to add recipients
7777

7878
# Add a To address by passing the email address
@@ -94,9 +94,9 @@ response = client.send(message)
9494
```
9595

9696
## Bulk Message
97-
A bulk message usually contains a single recipient per message
98-
and is generally used to send the same content to many recipients,
99-
optionally customizing the message via the use of MergeData.
97+
A bulk message usually contains a single recipient per message
98+
and is generally used to send the same content to many recipients,
99+
optionally customizing the message via the use of MergeData.
100100
For more information about using Merge data, please see the [Injection API documentation](https://www.socketlabs.com/docs/inject/).
101101
```ruby
102102
require "socketlabs-injectionapi"
@@ -130,20 +130,20 @@ response = client.send(message)
130130

131131
<a name="managing-api-keys" id="managing-api-keys"></a>
132132
## Managing API Keys
133-
For ease of demonstration, many of our examples include the ServerId (SOCKETLABS_SERVER_ID) and API key
134-
(SOCKETLABS_INJECTION_API_KEY) directly in our code sample. Generally it is not considered a good practice to store
135-
sensitive information like this directly in your code. Depending on your project type, we recommend either storing your
136-
credentials using Environment Variables. For more information please see:
133+
For ease of demonstration, many of our examples include the ServerId (SOCKETLABS_SERVER_ID) and API key
134+
(SOCKETLABS_INJECTION_API_KEY) directly in our code sample. Generally it is not considered a good practice to store
135+
sensitive information like this directly in your code. Depending on your project type, we recommend either storing your
136+
credentials using Environment Variables. For more information please see:
137137
[Using Environment Variables](https://docs.microsoft.com/en-us/dotnet/api/system.environment.getenvironmentvariable)
138138

139139

140140
<a name="examples-and-use-cases" id="examples-and-use-cases"></a>
141141
# Examples and Use Cases
142-
In order to demonstrate the many possible use cases for the SDK, we've provided
143-
an assortment of code examples. These examples demonstrate many different
144-
features available to the Injection API and SDK, including using templates
145-
created in the [SocketLabs Email Designer](https://www.socketlabs.com/blog/introducing-new-email-designer/), custom email headers, sending
146-
attachments, sending content that is stored in an HTML file, advanced bulk
142+
In order to demonstrate the many possible use cases for the SDK, we've provided
143+
an assortment of code examples. These examples demonstrate many different
144+
features available to the Injection API and SDK, including using templates
145+
created in the [SocketLabs Email Designer](https://www.socketlabs.com/blog/introducing-new-email-designer/), custom email headers, sending
146+
attachments, sending content that is stored in an HTML file, advanced bulk
147147
merging, and even pulling recipients from a datasource.
148148

149149
### [Basic send example](https://github.com/socketlabs/socketlabs-ruby/blob/master/examples/basic/basic_send.rb)
@@ -153,11 +153,11 @@ This example demonstrates a Basic Send.
153153
This example demonstrates many features of the Basic Send, including adding multiple recipients, adding message and mailing id's, and adding an embedded image.
154154

155155
### [Basic send from HTML file](https://github.com/socketlabs/socketlabs-ruby/blob/master/examples/basic/basic_send_from_html_file.rb)
156-
This example demonstrates how to read in your HTML content from an HTML file
156+
This example demonstrates how to read in your HTML content from an HTML file
157157
rather than passing in a string directly.
158158

159159
### [Basic send from SocketLabs Template](https://github.com/socketlabs/socketlabs-ruby/blob/master/examples/basic/basic_send_with_api_template.rb)
160-
This example demonstrates the sending of a piece of content that was created in the
160+
This example demonstrates the sending of a piece of content that was created in the
161161
SocketLabs Email Designer. This is also known as the [API Templates](https://www.socketlabs.com/blog/introducing-api-templates/) feature.
162162

163163
### [Basic send with specified character set](https://github.com/socketlabs/socketlabs-ruby/blob/master/examples/basic/basic_send_with_ascii_charset.rb)
@@ -195,19 +195,19 @@ This example demonstrates the results of attempting to do a send with invalid re
195195
This example demonstrates how to send a bulk message to multiple recipients.
196196

197197
### [Bulk send with merge data](https://github.com/socketlabs/socketlabs-ruby/blob/master/examples/bulk/bulk_send_with_merge_data.rb)
198-
This example demonstrates how to send a bulk message to multiple recipients with
198+
This example demonstrates how to send a bulk message to multiple recipients with
199199
unique merge data per recipient.
200200

201201
### [Bulk send with complex merge including attachments](https://github.com/socketlabs/socketlabs-ruby/blob/master/examples/bulk/bulk_send_complex.rb)
202-
This example demonstrates many features of the `BulkMessage()`, including
202+
This example demonstrates many features of the `BulkMessage()`, including
203203
adding multiple recipients, merge data, and adding an attachment.
204204

205205
### [Bulk send with recipients pulled from a datasource](https://github.com/socketlabs/socketlabs-ruby/blob/master/examples/bulk/bulk_send_from_data_source_with_merge_data.rb)
206-
This example uses a mock repository class to demonstrate how you would pull
206+
This example uses a mock repository class to demonstrate how you would pull
207207
your recipients from a database and create a bulk mailing with merge data.
208208

209209
### [Bulk send with Ascii charset and special characters](https://github.com/socketlabs/socketlabs-ruby/blob/master/examples/bulk/bulk_send_with_ascii_charset_merge_data.rb)
210-
This example demonstrates how to send a bulk message with a specified character
210+
This example demonstrates how to send a bulk message with a specified character
211211
set and special characters.
212212

213213
### [Bulk send with Amp ](https://github.com/socketlabs/socketlabs-ruby/blob/master/examples/bulk/bulk_send_with_amp_body.rb )
@@ -216,7 +216,8 @@ For more information about AMP please see [AMP Project](https://amp.dev/document
216216

217217
<a name="version"></a>
218218
# Version
219-
* 1.4.2 - Adding API Key Authorization
219+
* 1.4.3 - Added MetadataOrTagsAreTooLarge error messsage
220+
* 1.4.2 - Adding API Key Authorization
220221
* 1.4.0 - Adding Metadata and Tags
221222
* 1.2.1 - Adding optional retry logic for Http requests. If configured, the request will retry when certain 500 errors occur (500, 502, 503, 504)
222223
* 1.1.1 - Adding request timeout value on the client for Http requests

0 commit comments

Comments
 (0)