Skip to content

Commit

Permalink
Ignore AAD destination addresses in recipient check. Fixes #6
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsanford committed Jan 18, 2022
1 parent 49996fe commit 7e3fc04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Walled Garden Outlook AddIn/OutlookAddIn/ThisAddIn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void OutlookApplication_ItemSend(object Item, ref bool Cancel)

foreach (Recipient recipient in this.mailItem.Recipients)
{
if (!recipient.Address.EndsWith(Domain))
if (recipient.Address.Contains("@") && !recipient.Address.EndsWith(Domain))
{
Outsiders += "- " + recipient.Address + "\r\n";
}
Expand Down

0 comments on commit 7e3fc04

Please sign in to comment.