You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -30,32 +30,32 @@ For most uses we recommend installing the SocketLabs.EmailDelivery package via N
30
30
PM> Install-Package SocketLabs.EmailDelivery
31
31
```
32
32
33
-
.NET CLI users can also use the following command:
33
+
.NET CLI users can also use the following command:
34
34
35
35
```
36
36
> dotnet add package SocketLabs.EmailDelivery
37
37
```
38
38
39
39
Alternately, you can simply [clone this repository](https://github.com/socketlabs/socketlabs-csharp.git) directly to include the source code in your project.
40
40
41
-
**Note for Visual Studio 2012 and earlier users**: Due to an issue with dependency requirements, the package manager in VS2012
42
-
and earlier does not support installation of the current nuget package. In order to install the package directly, all you need to do
43
-
is download the latest release binaries located at [https://github.com/socketlabs/socketlabs-csharp/releases/](https://github.com/socketlabs/socketlabs-csharp/releases/).
44
-
Once you download the zip file, extract the files, and add the dll's from ```the lib\net45``` directory as references.
41
+
**Note for Visual Studio 2012 and earlier users**: Due to an issue with dependency requirements, the package manager in VS2012
42
+
and earlier does not support installation of the current nuget package. In order to install the package directly, all you need to do
43
+
is download the latest release binaries located at [https://github.com/socketlabs/socketlabs-csharp/releases/](https://github.com/socketlabs/socketlabs-csharp/releases/).
44
+
Once you download the zip file, extract the files, and add the dll's from ```the lib\net45``` directory as references.
45
45
You can do this from the project menu by clicking "Add Reference" then going to the browse option and picking the dll's from there.
46
46
47
47
<aname="getting-started"></a>
48
48
# Getting Started
49
49
## Obtaining your API Key and SocketLabs ServerId number
50
-
In order to get started, you'll need to enable the Injection API feature in the [SocketLabs Control Panel](https://cp.socketlabs.com).
51
-
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).
52
-
Make note of your 4 or 5 digit ServerId number, as you'll need this along with
53
-
your API key in order to use the Injection API.
50
+
In order to get started, you'll need to enable the Injection API feature in the [SocketLabs Control Panel](https://cp.socketlabs.com).
51
+
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).
52
+
Make note of your 4 or 5 digit ServerId number, as you'll need this along with
53
+
your API key in order to use the Injection API.
54
54
55
-
To enable the Injection API, click on the "For Developers" dropdown on the top-level navigation, then choose the "Configure HTTP Injection API" option.
55
+
To enable the Injection API, click on the "For Developers" dropdown on the top-level navigation, then choose the "Configure HTTP Injection API" option.
56
56
Once here, you can enable the feature by choosing the "Enabled" option in the
57
-
dropdown. Enabling the feature will also generate your API key, which you'll
58
-
need (along with your ServerId) to start using the API. Be sure to click the
57
+
dropdown. Enabling the feature will also generate your API key, which you'll
58
+
need (along with your ServerId) to start using the API. Be sure to click the
59
59
"Update" button to save your changes once you are finished.
60
60
61
61
## Quick Send
@@ -76,8 +76,8 @@ SocketLabsClient.QuickSend(
76
76
```
77
77
78
78
## Basic Message
79
-
A basic message is an email message like you'd send from a personal email client such as Outlook.
80
-
A basic message can have many recipients, including multiple To addresses, CC addresses, and even BCC addresses.
79
+
A basic message is an email message like you'd send from a personal email client such as Outlook.
80
+
A basic message can have many recipients, including multiple To addresses, CC addresses, and even BCC addresses.
81
81
You can also send a file attachment in a basic message.
82
82
83
83
```C#
@@ -103,9 +103,9 @@ var response = client.Send(message);
103
103
```
104
104
105
105
## Bulk Message
106
-
A bulk message usually contains a single recipient per message
107
-
and is generally used to send the same content to many recipients,
108
-
optionally customizing the message via the use of MergeData.
106
+
A bulk message usually contains a single recipient per message
107
+
and is generally used to send the same content to many recipients,
108
+
optionally customizing the message via the use of MergeData.
109
109
For more information about using Merge data, please see the [Injection API documentation](https://www.socketlabs.com/api-reference/injection-api/#merging).
110
110
```C#
111
111
usingSocketLabs.InjectionApi;
@@ -131,30 +131,30 @@ var response = client.Send(message);
131
131
132
132
<aname="managing-api-keys"></a>
133
133
## Managing API Keys
134
-
For ease of demonstration, many of our examples include the ServerId and API
135
-
key directly in our code sample. Generally it is not considered a good practice
136
-
to store sensitive information like this directly in your code. Depending on
137
-
your project type, we recommend either storing your credentials in an `app.config` or a `web.config` file, or using Environment Variables. For more
138
-
information please see:
134
+
For ease of demonstration, many of our examples include the ServerId and API
135
+
key directly in our code sample. Generally it is not considered a good practice
136
+
to store sensitive information like this directly in your code. Depending on
137
+
your project type, we recommend either storing your credentials in an `app.config` or a `web.config` file, or using Environment Variables. For more
In order to demonstrate the many possible use cases for the SDK, we've provided
146
-
an assortment of code examples. These examples demonstrate many different
147
-
features available to the Injection API and SDK, including using templates
148
-
created in the [SocketLabs Email Designer](https://www.socketlabs.com/blog/introducing-new-email-designer/), custom email headers, sending
149
-
attachments, sending content that is stored in an HTML file, advanced bulk
145
+
In order to demonstrate the many possible use cases for the SDK, we've provided
146
+
an assortment of code examples. These examples demonstrate many different
147
+
features available to the Injection API and SDK, including using templates
148
+
created in the [SocketLabs Email Designer](https://www.socketlabs.com/blog/introducing-new-email-designer/), custom email headers, sending
149
+
attachments, sending content that is stored in an HTML file, advanced bulk
150
150
merging, and even pulling recipients from a datasource.
151
151
152
152
### [Basic send from SocketLabs Template](https://github.com/socketlabs/socketlabs-csharp/blob/master/Example%20Projects/dotNetCoreExample/Examples/Basic/BasicSendWithApiTemplate.cs)
153
-
This example demonstrates the sending of a piece of content that was created in the
153
+
This example demonstrates the sending of a piece of content that was created in the
154
154
SocketLabs Email Designer. This is also known as the [API Templates](https://www.socketlabs.com/blog/introducing-api-templates/) feature.
155
155
156
156
### [Basic send from HTML file](https://github.com/socketlabs/socketlabs-csharp/blob/master/Example%20Projects/dotNetCoreExample/Examples/Basic/BasicSendFromHtmlFile.cs)
157
-
This example demonstrates how to read in your HTML content from an HTML file
157
+
This example demonstrates how to read in your HTML content from an HTML file
158
158
rather than passing in a string directly.
159
159
160
160
### [Basic send with file attachment](https://github.com/socketlabs/socketlabs-csharp/blob/master/Example%20Projects/dotNetCoreExample/Examples/Basic/BasicSendWithAttachment.cs)
@@ -175,25 +175,32 @@ This example demonstrates how to use a proxy with your HTTP client.
This example demonstrates many features of the Basic Send, including adding multiple recipients, adding message and mailing id's, and adding an embedded image.
177
177
178
+
### [Basic send with Amp ](https://github.com/socketlabs/socketlabs-csharp/blob/master/Example%20Projects/dotNetCoreExample/Examples/Basic/BasicSendWithApiTemplate.cs)
179
+
This example demonstrates how to send a basic message with an AMP Html body.
180
+
For more information about AMP please see [AMP Project](https://amp.dev/documentation/)
181
+
178
182
### [Bulk send with multiple recipients](https://github.com/socketlabs/socketlabs-csharp/blob/master/Example%20Projects/dotNetCoreExample/Examples/Bulk/BulkSend.cs)
179
183
This example demonstrates how to send a bulk message to multiple recipients.
180
184
181
185
### [Bulk send with merge data](https://github.com/socketlabs/socketlabs-csharp/blob/master/Example%20Projects/dotNetCoreExample/Examples/Bulk/BulkSendWithMergeData.cs)
182
-
This example demonstrates how to send a bulk message to multiple recipients with
186
+
This example demonstrates how to send a bulk message to multiple recipients with
183
187
unique merge data per recipient.
184
188
185
189
### [Bulk send with complex merge including attachments](https://github.com/socketlabs/socketlabs-csharp/blob/master/Example%20Projects/dotNetCoreExample/Examples/Bulk/BulkSendComplexExample.cs)
186
-
This example demonstrates many features of the `BulkMessage()`, including
190
+
This example demonstrates many features of the `BulkMessage()`, including
187
191
adding multiple recipients, merge data, and adding an attachment.
188
192
189
193
### [Bulk send with recipients pulled from a datasource](https://github.com/socketlabs/socketlabs-csharp/blob/master/Example%20Projects/dotNetCoreExample/Examples/Bulk/BulkSendFromDataSourceWithMerge.cs)
190
-
This example uses a mock repository class to demonstrate how you would pull
194
+
This example uses a mock repository class to demonstrate how you would pull
191
195
your recipients from a database and create a bulk mailing with merge data.
192
196
193
197
### [Bulk send with Ascii charset and special characters](https://github.com/socketlabs/socketlabs-csharp/blob/master/Example%20Projects/dotNetCoreExample/Examples/Bulk/BulkSendWithAsciiCharsetMergeData.cs)
194
-
This example demonstrates how to send a bulk message with a specified character
198
+
This example demonstrates how to send a bulk message with a specified character
195
199
set and special characters.
196
200
201
+
### [Bulk send with Amp ](https://github.com/socketlabs/socketlabs-csharp/blob/master/Example%20Projects/dotNetCoreExample/Examples/Bulk/BulkSendWithAmpBody.cs)
202
+
This example demonstrates how to send a bulk message with an AMP Html body.
203
+
For more information about AMP please see [AMP Project](https://amp.dev/documentation/)
0 commit comments