forked from OPCFoundation/UA-CloudLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding cc on register email to inform cesmii devops of register. Fixg…
…in a few cosmetics.
- Loading branch information
Showing
5 changed files
with
19 additions
and
6 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 |
---|---|---|
|
@@ -88,16 +88,29 @@ public async Task<IActionResult> OnPostAsync(string returnUrl = null) | |
values: new { area = "Identity", userId = user.Id, code = code, returnUrl = returnUrl }, | ||
protocol: Request.Scheme); | ||
|
||
//notify registering user | ||
StringBuilder sbBody = new StringBuilder(); | ||
sbBody.AppendLine("<h1>Welcome to the CESMII UA Cloud Library</h1>"); | ||
sbBody.AppendLine("<p>Thank you for creating an account on the CESMII UA Cloud Library. "); | ||
sbBody.AppendLine($"<b>Please confirm your account by <a href='{HtmlEncoder.Default.Encode(callbackUrl)}'>clicking here</a>.</b></p>"); | ||
if (_userManager.Options.SignIn.RequireConfirmedAccount) | ||
{ | ||
sbBody.AppendLine($"<b>Please confirm your account by <a href='{HtmlEncoder.Default.Encode(callbackUrl)}'>clicking here</a>.</b></p>"); | ||
} | ||
sbBody.AppendLine("<p>The CESMII UA Cloud Library is hosted by <a href='https://www.cesmii.org/'>CESMII</a>, the Clean Energy Smart Manufacturing Institute! This Cloud Library contains curated node sets created by CESMII or its members, as well as node sets from the <a href='https://uacloudlibrary.opcfoundation.org/'>OPC Foundation Cloud Library</a>.</p>"); | ||
sbBody.AppendLine("<p>Sincerely,<br />CESMII DevOps Team</p>"); | ||
|
||
await _emailSender.SendEmailAsync(Input.Email, "CESMII | Cloud Library | New Account Confirmation", | ||
sbBody.ToString()); | ||
|
||
//notify CESMII dev ops as well | ||
StringBuilder sbBody2 = new StringBuilder(); | ||
sbBody2.AppendLine("<h1>CESMII UA Cloud Library - New Account Sign Up</h1>"); | ||
sbBody2.AppendLine($"<p>User <b>'{Input.Email}'</b> created an account on the CESMII UA Cloud Library. "); | ||
sbBody2.AppendLine("<p>The CESMII UA Cloud Library is hosted by <a href='https://www.cesmii.org/'>CESMII</a>, the Clean Energy Smart Manufacturing Institute! This Cloud Library contains curated node sets created by CESMII or its members, as well as node sets from the <a href='https://uacloudlibrary.opcfoundation.org/'>OPC Foundation Cloud Library</a>.</p>"); | ||
sbBody2.AppendLine("<p>Sincerely,<br />CESMII DevOps Team</p>"); | ||
//await _emailSender.SendEmailAsync("[email protected]", "CESMII | Cloud Library | New Account Sign Up",sbBody2.ToString()); | ||
await _emailSender.SendEmailAsync("[email protected]", "CESMII | Cloud Library | New Account Sign Up",sbBody2.ToString()); | ||
|
||
if (_userManager.Options.SignIn.RequireConfirmedAccount) | ||
{ | ||
return RedirectToPage("RegisterConfirmation", new { email = Input.Email, returnUrl = returnUrl }); | ||
|
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
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 |
---|---|---|
|
@@ -50,7 +50,7 @@ public Task SendEmailAsync(string email, string subject, string htmlMessage) | |
if (string.IsNullOrEmpty(emailReplyTo)) emailReplyTo = "[email protected]"; | ||
|
||
SendGridMessage msg = new SendGridMessage() { | ||
From = new EmailAddress(emailFrom), | ||
From = new EmailAddress(emailFrom,"CESMII Dev Ops"), | ||
ReplyTo = new EmailAddress(emailReplyTo), | ||
Subject = subject, | ||
PlainTextContent = htmlMessage, | ||
|
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
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