Skip to content

Commit

Permalink
Set subject/body consistently across all examples
Browse files Browse the repository at this point in the history
  • Loading branch information
filipetoscano committed Jan 24, 2025
1 parent 1d48ae0 commit fa67e51
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions examples/AsyncHangfire/Controllers/TestController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public async Task<ActionResult> Get()
var message = new EmailMessage();
message.From = "[email protected]";
message.To.Add( "[email protected]" );
message.Subject = "Hello!";
message.TextBody = "Email from Minimal API";
message.Subject = "Hello from Async Hangfire";
message.TextBody = "Email using Resend .NET SDK";


/*
Expand Down
8 changes: 4 additions & 4 deletions examples/AsyncTemporal/Controllers/TestController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ public async Task<ActionResult> Get()
var message = new EmailMessage();
message.From = "[email protected]";
message.To.Add( "[email protected]" );
message.Subject = "Hello!";
message.TextBody = "Email from Minimal API";
message.Subject = "Hello from Async Temporal";
message.TextBody = "Email using Resend .NET SDK";


/*
*
*/
var instanceId = Guid.NewGuid().ToString().ToLowerInvariant();

var workflowId = await _temporal.ExecuteWorkflowAsync(
var handle = await _temporal.StartWorkflowAsync(
( EmailSendWorkflow wf ) => wf.RunAsync( message ),
new WorkflowOptions( id: $"resend-{instanceId}", taskQueue: TemporalWorker.TaskQueue ) );

_logger.LogInformation( "Email {InstanceId} = Temporal {WorkflowId}", instanceId, workflowId );
_logger.LogInformation( "Email: Temporal {HandleId} - {RunId}", handle.Id, handle.RunId );

return Ok();
}
Expand Down
4 changes: 2 additions & 2 deletions examples/ConsoleNoDi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
{
From = "[email protected]",
To = "[email protected]",
Subject = "Console - No DI",
HtmlBody = "<p>Congrats on sending your <strong>first email</strong>!</p>",
Subject = "Hello from Console",
HtmlBody = "<p>Email using <strong>Resend .NET SDK</strong></p>",
} );

Console.WriteLine( "Id={0}", resp.Content );
Expand Down
4 changes: 2 additions & 2 deletions examples/WebMinimalApi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
var message = new EmailMessage();
message.From = "[email protected]";
message.To.Add( "[email protected]" );
message.Subject = "Hello!";
message.TextBody = "Email from Minimal API";
message.Subject = "Hello from Minimal API";
message.TextBody = "Email using Resend .NET SDK";

var resp = await resend.EmailSendAsync( message );

Expand Down
8 changes: 4 additions & 4 deletions examples/WebRazor/Pages/Index.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public void OnGet()
{
this.From = "[email protected]";
this.To = "[email protected]";
this.Subject = "Hello!";
this.TextBody = "Email from Razor";
this.Subject = "Hello from Razor";
this.TextBody = "Email using Resend .NET SDK";
}


Expand All @@ -53,11 +53,11 @@ public void OnGet()

/// <summary />
[TempData]
public string SentTo { get; set; }
public string? SentTo { get; set; }

/// <summary />
[TempData]
public string EmailId { get; set; }
public string? EmailId { get; set; }


/// <summary />
Expand Down

0 comments on commit fa67e51

Please sign in to comment.