The SocketLabs Email Delivery .NET library allows you to easily send any type of email message supported by our Injection API, from a simple message to a single recipient, to a complex bulk message sent to multiple recipients.

Send Bulk Email Without Having to Build & Maintain Your Own SMTP Email Servers

Quick Send

The QuickSend() method is a static method that allows you to quickly and easily send a message to a single recipient with only one statement!

SocketLabsClient.QuickSend(
    000001, //Your SocketLabs ServerId
    "YOUR-API-KEY", //Your Injection API Key
    "[email protected]", //The To address for your message
    "[email protected]", //The From address for your message
    "Lorem Ipsum", //The Subject line for your message
    "<html>Lorem Ipsum</html>", //The HTML content for your message
    "Lorem Ipsum" //The plaintext content for your message
);

 

Basic Message

A basic message is an email message like you’d send from a personal email client such as Outlook. A basic message can have many recipients, including multiple, To Addresses, CC Addresses, and even BCC Addresses. You can also send a file attachment in a basic message.

var client = new SocketLabsClient(serverId, apiKey);

var message = new BasicMessage();

message.Subject = "Sending A BasicMessage";
message.HtmlBody = "<html>This is the Html Body of my message.</html>";
message.PlainTextBody = "This is the Plain Text Body of my message.";
message.From.Email = "[email protected]";
message.To.Add("[email protected]");

var response = client.Send(message);

 

Bulk Message

A bulk message usually contains a single recipient per message and is generally used to send the same content to many recipients, optionally customizing the message via the use of MergeData.

var client = new SocketLabsClient(000001, "YOUR-API-KEY"); //Your SocketLabs ServerId and Injection API key

var message = new BulkMessage();

message.PlainTextBody = "This is the body of my message sent to %%Name%%";
message.HtmlBody = "<html>This is the HtmlBody of my message sent to %%Name%%</html>";
message.Subject = "Sending a test message";
message.From.Email = "[email protected]";

var recipient1 = message.To.Add("[email protected]");
recipient1.MergeData.Add("Name","Recipient1");

var recipient2 = message.To.Add("[email protected]");
recipient2.MergeData.Add("Name","Recipient2");

var response = client.Send(message);

 

How to Get Started

To run these samples you will need to obtain an API Key and ServerId number from your SocketLabs Control Panel.

I Don’t Have a SocketLabs Account

Create Your Account

I Have a SocketLabs Account

Get Your API Key and Server ID

About Our Code Libraries

SocketLabs’ email API plays well with your favorite platforms and development frameworks, including .NET, PHP, Java, Node.js, Python, Go, and more! As a developer, our APIs for sending email give you all the tools you need to embed powerful email functionality into your applications.

SocketLabs  Developers

support

SocketLabs is built for developers, by developers.

email

Reach the inbox with industry-leading deliverability.

Integrate with your application in minutes.

Looking for More Libraries & Code Samples?

Speed up development with pre-built libraries and code samples for popular languages. Choose a library below!