Hi Everyone, I struggled with this and couldn’t find much help here in the forum, so thought I’d share for anyone else having the same issue. @QF: perhaps you could verify and add to your documentation?
Before configuring Quickfile to send using O365, you must configure a user with:
- An O365 license (so that it has a mailbox)
- Permission to send on behalf of the desired From address
- Permission to use SMTP transport
For (1) the license, E1 or Business Basic is sufficient. For (2), go to the “From” mailbox in Exchange Admin Centre and give the account you’ll be authenticating with Send As permission.
For (3), you have to run some Powershell:
# specify domain and admin credential
$domain='yourdomain.co.uk'
$credential = Get-Credential
# Install Module and connect to ExchangeOnline
Install-Module -Name ExchangeOnlineManagement
Connect-ExchangeOnline -Credential $credential -ShowProgress $true
# Disable the global permission for SMTP authentiation (it's already disabled by default)
Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled
#Set-TransportConfig -SmtpClientAuthenticationDisabled $true
Set-TransportConfig -SmtpClientAuthenticationDisabled $false
Get-TransportConfig | Format-List SmtpClientAuthenticationDisabled
# Enable SMTP transport for the specific user
Get-CASMailbox -Identity relay.user@yourdomain.co.uk | Format-List SmtpClientAuthenticationDisabled
# Set-CASMailbox -Identity relay.user@yourdomain.co.uk -SmtpClientAuthenticationDisabled $false
Set-CASMailbox -Identity relay.user@yourdomain.co.uk -SmtpClientAuthenticationDisabled $true
Get-CASMailbox -Identity relay.user@yourdomain.co.uk | Format-List SmtpClientAuthenticationDisabled
# Test. Note the above configuration might take a while to take effect (like an hour)
$RelayCredential = Get-Credential
$mailParams = @{
smtpServer = "smtp.office365.com"
Port = '587'
UseSSL=$true
Credential = $RelayCredential
From = "support@yourdomain.co.uk"
To="recipient@yourdomain.co.uk"
Subject = "SMTP Relay"
Body="Message SMTP Relay"
DeliveryNotificationOption='onFailure','OnSuccess'
}
Send-MailMessage @mailParams
Finally, go configure SMTP settings in QF.
- Port: 587
- From: the mailbox you granted Send As permission for
- Host name: smpt.office365.com
- Username: relay.user@yourdomain.co.uk
- Use Secure STARTTLS: checked
- Send Activation Email to: somebody@yourdomain.co.uk
Hope this helps somebody!
Cheers
Rob