Skip to content

Commit c847e9d

Browse files
Merge pull request #3 from IowaComputerGurus/feature/fix-attachment-emails
Fix for Email With Attachment and Tokens
2 parents 9614ec6 + 576e87a commit c847e9d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/NetCore.Utilities.Email.Resend/ResendService.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ public Task<bool> SendMessageWithAttachmentAsync(string toAddress, IEnumerable<s
180180
throw new NotSupportedException("This service does not support a custom sender key at this time");
181181
}
182182

183+
if (tokens != null)
184+
foreach (var item in tokens)
185+
bodyHtml = bodyHtml.Replace(item.Key, item.Value);
186+
183187
//Get the message to send
184188
var toSend = _messageBuilder.CreateMessageWithAttachment(_serviceOptions.AdminEmail, _serviceOptions.AdminName,
185189
toAddress,

0 commit comments

Comments
 (0)