Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ PM> Install-Package SocketLabs.EmailDelivery
Adding a Package Reference to your project:

```
<PackageReference Include="SocketLabs.EmailDelivery" Version="2.0.0" />
<PackageReference Include="SocketLabs.EmailDelivery" Version="2.0.1" />
```

.NET CLI users can also use the following command:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 2.0.0
## 2.0.1

* Fix issue with ApiKey being unset for bearer type keys
* Add explicit support for .NET 8.0 and .NET 9.0
Expand Down
12 changes: 10 additions & 2 deletions docs/release-notes/latest.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
## 1.4.3
* Added MetadataOrTagsAreTooLarge error messsage
## 2.0.1

* Fix issue with ApiKey being unset for bearer type keys
* Add explicit support for .NET 8.0 and .NET 9.0
* Update dependencies
* Implement nullable pattern

```note
This is a breaking change. Some objects require constructor initialization now.
```
6 changes: 3 additions & 3 deletions src/SocketLabs/SocketLabs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
<PackageId>SocketLabs.EmailDelivery</PackageId>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Version>2.0.0</Version>
<Version>2.0.1</Version>
<Copyright>Copyright © 2018-2025 SocketLabs Acquisition LLC</Copyright>
<Authors>Matt Soler, David Schrenker, Mike Boshuyzen, Joe Cooper, Matt Reibach, Ryan Lydzinski, Mike Goodfellow, Saranya Kavuri</Authors>
<Product>SocketLabs .Net Client Library</Product>
<AssemblyVersion>2.0.0</AssemblyVersion>
<FileVersion>2.0.0</FileVersion>
<AssemblyVersion>2.0.1</AssemblyVersion>
<FileVersion>2.0.1</FileVersion>
<Description>Easily send email messages using the SocketLabs Injection API.</Description>
<RepositoryUrl>https://github.com/socketlabs/socketlabs-csharp</RepositoryUrl>
<PackageProjectUrl>https://inject.docs.socketlabs.com/</PackageProjectUrl>
Expand Down
22 changes: 21 additions & 1 deletion test/SocketLabs.Tests/InjectionApi/SocketLabsClientTests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json.Linq;
using SocketLabs.InjectionApi;
using SocketLabs.InjectionApi.Message;
using System;
Expand Down Expand Up @@ -34,5 +36,23 @@ public async Task SendAsyncTest()
// The client should throw the same exception on subsequent calls.
await Assert.ThrowsExceptionAsync<HttpRequestException>(async () => await client.SendAsync(message, CancellationToken.None));
}


[TestMethod()]
public async Task CanSendMessage()
{
var _client = new SocketLabsClient(42006, "DcYYCkSQoV2exx8ksztt.UsImvR6ckr1_r32wC3KPWmd2D1Sz7PGfRx6fJPrg")
{
NumberOfRetries = 3
};

var message = new BasicMessage();
message.To.Add("matt.soler@socketlabs.com");
message.From.Email = "do-reply@ai.socketlabs.email";
message.Subject = "This is a test";
message.HtmlBody = "<p>Hi!</p>";

var response = await _client.SendAsync(message, CancellationToken.None);
}
}
}