Setup O365 in order that sends mail on another mail provider

Occasional Contributor


I administer a tenant for my organization that have users with various type of licenses. Some E5 accounts, some business basic (that both have an exchange mailbox) and some o365business without mailbox.
For a series of reasons, our corporate mail is still on Gsuite, so all the users (also the E5) have the "real" mail on google and we don't use (eve if you pay) the exchange mailboxes.

In many application (like Sharepoint or Teams) when a user is notified of something (eg. @ mention in a teams comment or "notify the the team" when I add a new document on a sharepoint library) the engine sends the mail to for the exchange users or fails to deliver in other cases.


Is it there a possibility to setup that we have an external provider (I don't know if thru dns or something else) ?

thanks in advance


5 Replies
best response confirmed by SandroRiz (Occasional Contributor)
The O365 services like SharePoint and Teams were designed with the expectation that the primary user's mailbox is located in Exchange Online.

A work-around is to configure Criteria-Based Routing (CBR) so that the email is forwarded to Google instead of the mailbox on Office 365.

Create a new distribution group "ForwardToGoogle"
Add the users to the group.
Connect to Exchange Online PowerShell

Create a CBR Connector:
$result = New-OutboundConnector -Name "CBRConnector" -ConnectorType OnPremises -SmartHosts “” -UseMXRecord $false -IsTransportRuleScoped $true
Create the Transport rule that redirects the mail to the connector
$result = New-TransportRule -Name "ForwardToGoogle" -SentToMemberOf "ForwardToGoogle" -RouteMessageOutboundConnector "CBRConnector"

If this was helpful, please mark as best answer.

@Joe Stocker  first of all thanks for the response and for your time.


Yes, it seems it works. Sharepoint's notify is sent (in spam folder, but it is another story) and when I schedule a meeting in Teams mail are sent to Google.


The only drawback is that now, if I schedule a meeting from Teams calendar, the creation is stucked (the spinning icon runs for minutes); the meeting is created, because mail starts, the link works and the record in the Posts timeline exists; but after long waiting, on the calendar there is nothing.


And I guess it is related to this change, because till yesterday I created dozens of meeting and they are all on the calendar. 


Any suggestion?

I assume the calendar doesn't contain the appointment because it was forwarded to google, so I think you'll have to train the user to not look at the Teams calendar but instead look at the Google calendar.
If that is not acceptable, then you should disable the transport rule and then enable SMTP forwarding on each mailbox, as that will allow the appointment to show on both the Teams app and also the Google calendar.
Test it on a single mailbox first:
Set-Mailbox -Identity "John Doe" -DeliverToMailboxAndForward $true -ForwardingSMTPAddress ""
Then to do it on all the rest of the mailboxes, put the source and destination address in a text file, then you could automate this like:
#The 'forwarding.csv' file contains two column headers, source and destination
$import =import-csv forwarding.csv
$import | %{Set-Mailbox -Identity $_.source -DeliverToMailboxAndForward $true -ForwardingSMTPAddress $_.destination

To prevent the email from being sent to Google's spam folder, update the DNS SPF TXT record to include this:

@Joe Stocker thanks again


The strange thing is that if I schedule a meeting without indicating a specific channel, the event is created normally, mail is sent and it appears on calendar.


Only if I choose a Team+Channel, then I have the issue of long-spinning + diseappering...


Question: if I follow your 2nd hint I had to write so:

Set-Mailbox -Identity "John Doe" -DeliverToMailboxAndForward $true -ForwardingSMTPAddress ""

where is the same for o365 (exhange online) and Gsuite.
So are you sure he will check the DNS MX and route to google?


Thank you

yes, MSFT will use DNS MX and route to google for the value inside ForwardingSMTPAddress