Hello all,
I'm trying to send an email to an O365 private group after a user account has expired.
I'm currently able to send to single users, but whenever I specify an O365 group address as a recipient, the group never receives the email. I've had IT run a message trace and it seems that it never gets sent to the group, only to individuals.
I've setup email notifications to multiple users before and have never run into this issue.
I thought it might be a problem with the built-in 'send email notification' action trying to send to an O365 group (yes, it is configured to receive internal and external mail), so I tried going the PowerShell route also :
# Email settings
$to = "jdoe@company.com" # TODO: modify me
$subject = "email" # TODO: modify me
$textBody = "Information" # TODO: modify me
$from = "sender@company.com" # TODO: modify me
$bcc = "group@company.com" # TODO: modify me
# Bind to the 'ServiceSettings' container
$wellknownContainerPath = $Context.GetWellKnownContainerPath("ServiceSettings")
$serviceSettings = $Context.BindToObject($wellknownContainerPath)
# Send mail
$serviceSettings.MailSettings.SendMail($to, $subject, $textBody, $NULL, $from, $NULL, $bcc)
I added the target O365 group as the $to, and my own address as the $bcc to confirm the email actually gets sent. I received the email, but the group never received it, and the adaxes log shows no errors.
Any pointers would be greatly appreciated.
Thank you!