-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set subject/body consistently across all examples
- Loading branch information
1 parent
1d48ae0
commit fa67e51
Showing
5 changed files
with
14 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"; | ||
|
||
|
||
/* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 ); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 ); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"; | ||
} | ||
|
||
|
||
|
@@ -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 /> | ||
|