1
0
mirror of https://github.com/bitwarden/server synced 2025-12-23 11:43:23 +00:00

org invite validation and email tweaks

This commit is contained in:
Kyle Spearrin
2017-03-28 21:16:19 -04:00
parent da29160218
commit 472a4ade8f
6 changed files with 43 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ using System.Threading.Tasks;
using Bit.Core.Models.Table;
using SendGrid;
using SendGrid.Helpers.Mail;
using System.Net;
namespace Bit.Core.Services
{
@@ -98,6 +99,7 @@ namespace Bit.Core.Services
message.AddSubstitution("{{organizationId}}", orgUser.OrganizationId.ToString());
message.AddSubstitution("{{organizationUserId}}", orgUser.Id.ToString());
message.AddSubstitution("{{token}}", token);
message.AddSubstitution("{{email}}", WebUtility.UrlEncode(orgUser.Email));
message.AddCategories(new List<string> { AdministrativeCategoryName, "Organization Invite" });
await _client.SendEmailAsync(message);