We migrated an email domain from one Microsoft 365 tenant to another, but an application still uses a mailbox in the old tenant to send mail through Exchange Online. Because the real domain now belongs to the new tenant, outgoing messages are being rewritten to a temporary or tenant-specific domain. Is there a way to rewrite the sender domain during outbound delivery with Microsoft 365, or should the application be routed through an external SMTP relay that can send using the original domain?
3 Answers
If the application sends more than a small amount of mail, it is worth removing it from Exchange Online entirely and using a transactional mail service. Microsoft is introducing a hard external-recipient sending limit for Exchange Online mailboxes, so an authenticated relay or API avoids both the tenant-domain problem and future mailbox-as-relay limits.
An external relay such as SMTP2GO can handle this. Configure the application—or a connector from the old tenant—to use the relay, then verify the domain there and publish the required SPF, DKIM, and DMARC DNS records. Remember to update SPF to authorize the relay, since the domain's DNS is now managed alongside the new tenant.
Exchange Online cannot reliably rewrite the sender to a domain that is accepted and authenticated in another tenant. A domain can generally be associated with only one tenant, and changing the From header with a transport rule will not solve DKIM or DMARC alignment. The practical options are to move the application to the new tenant or send through an external SMTP relay/API that supports the original domain.

Related Questions
Can't Load PhpMyadmin On After Server Update
Redirect www to non-www in Apache Conf
How To Check If Your SSL Cert Is SHA 1
Windows TrackPad Gestures