Skip to content

Commit 982c938

Browse files
readme.md update
1 parent 0fcea48 commit 982c938

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

README.md

Lines changed: 27 additions & 26 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 Go package 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.
@@ -12,7 +12,7 @@ The SocketLabs Email Delivery Go package allows you to easily send email message
1212

1313

1414
<a name="prerequisites-and-installation"></a>
15-
# Prerequisites and Installation
15+
# Prerequisites and Installation
1616
## Prerequisites
1717
* Go 1.2.2 or higher
1818
* A SocketLabs account. If you don't have one yet, you can [sign up for a free account](https://signup.socketlabs.com/step-1?plan=free) to get started.
@@ -21,30 +21,30 @@ The SocketLabs Email Delivery Go package allows you to easily send email message
2121
```
2222
go get github.com/socketlabs/socketlabs-go/injectionapi
2323
```
24-
24+
2525

2626
<a name="getting-started"></a>
2727
# Getting Started
2828
## Obtaining your API Key and SocketLabs ServerId number
29-
In order to get started, you'll need to enable the Injection API feature in the [SocketLabs Control Panel](https://cp.socketlabs.com).
30-
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).
31-
Make note of your 4 or 5 digit ServerId number, as you'll need this along with
32-
your API key in order to use the Injection API.
29+
In order to get started, you'll need to enable the Injection API feature in the [SocketLabs Control Panel](https://cp.socketlabs.com).
30+
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).
31+
Make note of your 4 or 5 digit ServerId number, as you'll need this along with
32+
your API key in order to use the Injection API.
3333

34-
To enable the Injection API, click on the "For Developers" dropdown on the top-level navigation, then choose the "Configure HTTP Injection API" option.
34+
To enable the Injection API, click on the "For Developers" dropdown on the top-level navigation, then choose the "Configure HTTP Injection API" option.
3535
Once here, you can enable the feature by choosing the "Enabled" option in the
36-
dropdown. Enabling the feature will also generate your API key, which you'll
37-
need (along with your ServerId) to start using the API. Be sure to click the
36+
dropdown. Enabling the feature will also generate your API key, which you'll
37+
need (along with your ServerId) to start using the API. Be sure to click the
3838
"Update" button to save your changes once you are finished.
39-
39+
4040
## Basic Message
41-
A basic message is an email message like you'd send from a personal email client such as Outlook.
42-
A basic message can have many recipients, including multiple To addresses, CC addresses, and even BCC addresses.
41+
A basic message is an email message like you'd send from a personal email client such as Outlook.
42+
A basic message can have many recipients, including multiple To addresses, CC addresses, and even BCC addresses.
4343
You can also send a file attachment in a basic message.
4444

45-
```GO
45+
```GO
4646

47-
import (
47+
import (
4848
"github.com/socketlabs/socketlabs-go/injectionapi"
4949
"github.com/socketlabs/socketlabs-go/injectionapi/message"
5050
)
@@ -68,15 +68,15 @@ func main() {
6868

6969
//Send the message
7070
_, _ = client.SendBasic(&basic)
71-
}
71+
}
7272
```
7373

7474
## Bulk Message
75-
A bulk message usually contains a single recipient per message
76-
and is generally used to send the same content to many recipients,
77-
optionally customizing the message via the use of MergeData.
75+
A bulk message usually contains a single recipient per message
76+
and is generally used to send the same content to many recipients,
77+
optionally customizing the message via the use of MergeData.
7878
For more information about using Merge data, please see the [Injection API documentation](https://www.socketlabs.com/docs/inject/).
79-
```GO
79+
```GO
8080
import (
8181
"github.com/socketlabs/socketlabs-go/injectionapi"
8282
"github.com/socketlabs/socketlabs-go/injectionapi/message"
@@ -94,7 +94,7 @@ func main() {
9494
bulk.PlainTextBody = "This is the Plain Text Body of my message sent to the recipient with %%EyeColor%% eyes.";
9595
bulk.From = message.EmailAddress{EmailAddress: "from@example.com"}
9696
bulk.ReplyTo = message.EmailAddress{EmailAddress: "replyto@example.com"}
97-
97+
9898
//Add Bulk Recipients
9999
recipient1 := bulk.AddToFriendlyBulkRecipient("recipient1@example.com", "Recipient #1")
100100
recipient1.AddMergeData("EyeColor", "Green")
@@ -113,11 +113,11 @@ For ease of demonstration, some of our examples may include the ServerId and API
113113

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

123123

@@ -191,6 +191,7 @@ For more information about AMP please see [AMP Project](https://amp.dev/document
191191

192192
<a name="version"></a>
193193
# Version
194+
* 1.1.1 - Adding request timeout value on the client for Http requests
194195
* 1.1.0 - Adds Amp Html Support
195196
* 1.0.0 - Initial Release
196197

0 commit comments

Comments
 (0)