Fix Exchange Mail Flow Rule Reject Message Text Invalid Error
Question details
The user needs to resolve a validation error preventing them from saving a custom rejection message in a Microsoft 365 Exchange mail flow rule.

- Product
- Microsoft 365 Exchange
- Device & OS
- not provided
- Scenario
- Creating an Exchange mail flow rule to reject incoming messages and provide the sender with a customized text explanation.
- Observed behavior
- The system throws an error stating that the RejectMessageReasonText or delivery status notification text is invalid, specifically occurring when the custom text contains line breaks.
Ensure you have the necessary administrator permissions in the Exchange admin center to create or modify mail flow rules.
Remove Line Breaks from the Rejection Message
Format your custom rejection text as a single, continuous paragraph without any line breaks to bypass the validation error.
Exchange mail flow rules often struggle to process custom notification messages that contain line breaks or paragraph returns. Condensing your message into a single block of text is the most reliable workaround.
Highlight and copy your intended custom rejection message.
Open a word processing application like WPS Writer or Microsoft Word and paste the copied text into a blank document.
Manually delete all paragraph returns and line breaks so that your message forms one continuous line or paragraph.
Select the newly condensed, single-paragraph text and copy it to your clipboard.
Return to the Exchange admin center, paste the formatted text into the RejectMessageReasonText field of your mail flow rule, and save the rule.

Boost Your Productivity with WPS Office
While WPS Office cannot configure your Microsoft Exchange server, it offers a robust, free alternative to Microsoft Office for formatting your rejection messages, drafting daily documents, and managing spreadsheets.
- 1. Download WPS Office: Visit the official WPS website and click the free download button.
- 2. Install the Suite: Run the installer and follow the simple on-screen instructions to set up the software.
- 3. Start Creating: Open Writer to draft and format your email server rejection texts effortlessly.

Frequently Asked Questions
Why does Exchange reject mail flow rule text with line breaks?
Exchange mail flow rules have strict syntax validation for custom rejection messages (RejectMessageReasonText). Line breaks and certain special characters can interfere with the underlying formatting code, triggering an invalid text error.
Is there a character limit for the Exchange rejection message?
Yes, Exchange imposes limits on the length of rejection messages. Always ensure your custom explanation is concise and falls within the character limit specified by your Microsoft 365 environment, which is typically a few hundred characters for basic transport rules.
Can I use HTML to format the rejection message instead?
By default, the RejectMessageReasonText field in standard mail flow rules only accepts plain text. Using HTML tags will not render as formatted text to the recipient and may also trigger further validation errors upon saving.




