Why would an email sent from a ColdFusion script to an Office 365 distribution list fail to make it to the list members?

132 Views Asked by At

I have an application that sends mail using the ColdFusion <cfmail> tag. When the recipient, specified in the "to" attribute, is a simple single-user mailbox or shared mailbox, the mail is delivered without issue. When the recipient is a distribution list, however, the mail never arrives at the list members' inboxes. Following is what the code looks like:

<cfprocessingdirective suppresswhitespace="no">
    <cfmail
        type="html"
        query="getRecord"
        from="Some Email Address<[email protected]>"
        to="[email protected]"
        subject="Subject Text">
        
        <p>Some text</p>

        <ul>
            <li>Some Field: #encodeForHTML(getRecord.someField)#</li>
            <li>Some Other Field: #encodeForHTML(getRecord.someOtherField)#</li>
        </ul>

        <p>Some text</p>
    </cfmail>
</cfprocessingdirective>

This has been tested with multiple distribution lists, and failed with all of them. I've tested adding a single-user email address or shared mailbox address to the CC or BCC attribute of the tag, and found that the mail arrives at the CC/BCC address, but not at the addresses of the members of the distribution list.

2

There are 2 best solutions below

0
Will Belden On

Sometimes group emails like that require the sender to be "inside" the group, or at least SMTP authenticated with the server. I'd check that first.

1
Ken Merkel On

For Office 365, all groups and distribution lists have Outside Receiving turned off by default. You should check in the configuration for the group if the "Let people outside this organization send mail to this group" check box has been turned on.

To get to this setting:

  • log into Office 365 as an administrator
  • select the group from the Active Groups list
  • click on the group to open the properties slide out
  • switch to the Settings tab
  • you can turn on the flag from this panel and apply the changes