diff --git a/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/PapercutSmtpContainerImageTags.cs b/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/PapercutSmtpContainerImageTags.cs
index 9a1e4733d..bafc9a085 100644
--- a/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/PapercutSmtpContainerImageTags.cs
+++ b/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/PapercutSmtpContainerImageTags.cs
@@ -4,5 +4,5 @@ internal static class PapercutSmtpContainerImageTags
{
public const string Registry = "docker.io";
public const string Image = "changemakerstudiosus/papercut-smtp";
- public const string Tag = "7.0.0-rc1";
+ public const string Tag = "7.6";
}
\ No newline at end of file
diff --git a/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/PapercutSmtpContainerResource.cs b/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/PapercutSmtpContainerResource.cs
index 8687a0044..9ed826b07 100644
--- a/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/PapercutSmtpContainerResource.cs
+++ b/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/PapercutSmtpContainerResource.cs
@@ -6,8 +6,8 @@
///
public class PapercutSmtpContainerResource(string name) : ContainerResource(name), IResourceWithConnectionString
{
- internal const int HttpEndpointPort = 80;
- internal const int SmtpEndpointPort = 25;
+ internal const int HttpEndpointPort = 8080;
+ internal const int SmtpEndpointPort = 2525;
internal const string HttpEndpointName = "http";
internal const string SmtpEndpointName = "smtp";
private EndpointReference? _smtpEndpoint;
diff --git a/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/PapercutSmtpHostingExtension.cs b/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/PapercutSmtpHostingExtension.cs
index ad7aa84f5..e86450b1a 100644
--- a/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/PapercutSmtpHostingExtension.cs
+++ b/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/PapercutSmtpHostingExtension.cs
@@ -35,7 +35,7 @@ public static IResourceBuilder AddPapercutSmtp(th
.WithHttpEndpoint(targetPort: PapercutSmtpContainerResource.HttpEndpointPort,
port: httpPort,
name: PapercutSmtpContainerResource.HttpEndpointName)
- .WithHttpHealthCheck("/health", httpPort, PapercutSmtpContainerResource.HttpEndpointName);
+ .WithHttpHealthCheck("/health", endpointName: PapercutSmtpContainerResource.HttpEndpointName);
return rb;
}
diff --git a/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/README.md b/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/README.md
index bf4f949c8..9264cc0be 100644
--- a/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/README.md
+++ b/src/CommunityToolkit.Aspire.Hosting.PapercutSmtp/README.md
@@ -37,3 +37,16 @@ var xyz = builder.AddProject("application")
builder.Build().Run();
```
+
+### Example 3: Get URI from connection-string using DbConnectionStringBuilder
+
+```csharp
+string? papercutConnectionString = builder.Configuration.GetConnectionString("papercut");
+DbConnectionStringBuilder connectionBuilder = new()
+{
+ ConnectionString = papercutConnectionString
+};
+
+Uri endpoint = new(connectionBuilder["Endpoint"].ToString()!, UriKind.Absolute);
+builder.Services.AddScoped(_ => new SmtpClient(endpoint.Host, endpoint.Port));
+```