[BUG] Send-PnPMail won't send to group addresses
@jansenbe is already working on this.
Since Apr 29, 2021.
- Dominant language
- C#
- Stars
- 259
- Forks
- 161
- Avg merge
- 10h 33m
- Merged PRs (30d)
- 1
Description
Using PnP.PowerShell version 1.5.0
Send-PnPMail will not send emails to group email addresses, only user address. If a group email address is used, it's simply removed. If the group is the only addressee, the command completes successfully, but no email is delivered. If the group is one of many addressees the command shows no errors, the email goes to the user addresses, and the group addresses do not existing on the To: or Cc: lines anywhere.
I have confirmed this happens with M365 Group and Mail-enabled Security Groups. I have reproduced this on an M365 Demo tenant and a customer production tenant.
Here are the groups:

Here's the PowerShell:

Here's the result:

I confirmed the email did not show up in members of the AskHR group, specifically LeeG.
If this is a limitation of the framework I'll update the Send-PnPMail documentation to reflect that.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.