Skip to content

Commit 50d7fff

Browse files
committed
Update README files with correct namespaces and usage
Updated code examples in all README files to use the correct Zetian.Server and related namespaces. Added missing using statements for clarity and improved documentation for advanced configuration, message storage, mailbox filtering, and composite filters. This enhances developer experience and ensures examples are accurate and ready to use.
1 parent f95c750 commit 50d7fff

3 files changed

Lines changed: 338 additions & 289 deletions

File tree

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Install-Package Zetian
4444
### Basic SMTP Server
4545

4646
```csharp
47-
using Zetian;
47+
using Zetian.Server;
4848

4949
// Create and start a basic SMTP server
5050
using var server = SmtpServerBuilder.CreateBasic();
@@ -66,6 +66,8 @@ await server.StopAsync();
6666
### Authenticated SMTP Server
6767

6868
```csharp
69+
using Zetian.Server;
70+
6971
using var server = new SmtpServerBuilder()
7072
.Port(587)
7173
.RequireAuthentication()
@@ -79,6 +81,8 @@ await server.StartAsync();
7981
### Secure SMTP Server with TLS
8082

8183
```csharp
84+
using Zetian.Server;
85+
8286
using var server = new SmtpServerBuilder()
8387
.Port(587)
8488
.Certificate("certificate.pfx", "password")
@@ -93,6 +97,10 @@ await server.StartAsync();
9397
### Using the Fluent Builder
9498

9599
```csharp
100+
using System.Net;
101+
using Zetian.Models;
102+
using Zetian.Server;
103+
96104
var server = new SmtpServerBuilder()
97105
.Port(587)
98106
.BindTo(IPAddress.Any)
@@ -139,8 +147,8 @@ var server = new SmtpServerBuilder()
139147
### Rate Limiting
140148

141149
```csharp
150+
using Zetian.Models;
142151
using Zetian.Extensions;
143-
using Zetian.Extensions.RateLimiting;
144152

145153
server.AddRateLimiting(
146154
RateLimitConfiguration.PerHour(100)
@@ -276,6 +284,9 @@ server.ErrorOccurred += (s, e) =>
276284

277285
```csharp
278286
// Option 1: Create a custom authenticator class
287+
using Zetian.Models;
288+
using Zetian.Abstractions;
289+
279290
public class CustomAuthenticator : IAuthenticator
280291
{
281292
public string Mechanism => "CUSTOM";
@@ -297,6 +308,9 @@ AuthenticatorFactory.Register("CUSTOM", () =>
297308
new CustomAuthenticator());
298309

299310
// Option 2: Use the authentication handler with builder
311+
using Zetian.Models;
312+
using Zetian.Server;
313+
300314
var server = new SmtpServerBuilder()
301315
.Port(587)
302316
.RequireAuthentication()

src/Zetian.HealthCheck/README.MD

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ dotnet add package Zetian.HealthCheck
3232
### Basic Health Check
3333

3434
```csharp
35-
using Zetian;
35+
using Zetian.Server;
3636
using Zetian.HealthCheck.Extensions;
3737

3838
// Create and start SMTP server
@@ -87,6 +87,10 @@ var healthCheck = server.EnableHealthCheck(IPAddress.Parse("192.168.1.100"), 808
8787
### Custom Health Checks
8888

8989
```csharp
90+
using Zetian.Server;
91+
using Zetian.HealthCheck.Models;
92+
using Zetian.HealthCheck.Extensions;
93+
9094
var healthCheck = server.EnableHealthCheck(8080);
9195

9296
// Add database check
@@ -132,6 +136,10 @@ await healthCheck.StartAsync();
132136
### Advanced Options
133137

134138
```csharp
139+
using Zetian.Server;
140+
using Zetian.HealthCheck.Options;
141+
using Zetian.HealthCheck.Extensions;
142+
135143
// Custom thresholds for SMTP health
136144
var smtpOptions = new SmtpHealthCheckOptions
137145
{
@@ -320,6 +328,8 @@ services:
320328
### Prometheus Metrics
321329
322330
```csharp
331+
using Zetian.HealthCheck.Models;
332+
323333
// Add custom metrics check for Prometheus
324334
healthCheck.AddHealthCheck("metrics", async (ct) =>
325335
{

0 commit comments

Comments
 (0)