-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2aaf7d1
commit 70da7ed
Showing
1 changed file
with
5 additions
and
0 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 |
---|---|---|
|
@@ -24,6 +24,8 @@ public class NotificationManager | |
private const string ENDPOINT_SETTING = "Endpoint"; | ||
private const string SENDGRID_KEY_SETTING = "SendGrid:Key"; | ||
private const string FROM_ADDRESS = "[email protected]"; | ||
private const string REPLY_TO_HEADER = "In-Reply-To"; | ||
private const string REFERENCES_HEADER = "References"; | ||
|
||
public NotificationManager(IConfiguration configuration, CosmosReviewRepository reviewRepository) | ||
{ | ||
|
@@ -93,6 +95,9 @@ private async Task SendEmailsAsync(ReviewModel review, ClaimsPrincipal user, str | |
plainTextContent, | ||
htmlContent, | ||
Enumerable.Repeat(new Dictionary<string, string>(), review.Subscribers.Count).ToList()); | ||
var threadHeader = $"<{review.ReviewId}{FROM_ADDRESS}>"; | ||
msg.AddHeader(REPLY_TO_HEADER, threadHeader); | ||
msg.AddHeader(REFERENCES_HEADER, threadHeader); | ||
await client.SendEmailAsync(msg); | ||
} | ||
|
||
|