Send As From a different email domain in Office 365 Exchange Online

I get this requested quite often so I thought I should post how to do it.

The scenario is that you have your main email account with Microsoft on Office 365/Exchange Online, say, and we connect to that mailbox via Outlook and/or Outlook Web Access. We also have email accounts setup elsewhere – on Google’s Gmail for instance say – and you are forwarding those emails to your main Office 365 account so that you know when new mail arrives.

Usually you would have to logon to the other service to reply to the emails – wouldn’t it be nice if you could reply from your account instead? Well, you can, and it’s really easy to setup:

Firstly, I can’t verify if this works with all email providers – it does work with Gmail accounts though.

To begin with you need to setup a contact in Office 365 for the other email address –

Logon as the admin user to Office 365/Exchange Online.

Goto to the Admin Centres, choose Users, select Contacts and add the email:

You will also need to add the domain to the verified domains list:

Goto Admin center, Settings, Domains.

Follow the instructions on adding a domain – you do not need to add the email DNS records in order for the domain to be used in your account. You just need to verify you own the account by adding the TXT DNS record and verifying via this portal.

Note: the adding of a domain can take up to 4 hours to complete – took only an hour in my case.

Next you need to connect to the Exchange online server using Powershell:

This article explains how to do that:

Open Powershell

Make sure you have issued the command to allow scripts to run:

Set-ExecutionPolicy RemoteSigned

Select ‘Y when prompted to turn scripting on.

Type in the credentials command:

$UserCredential = Get-Credential

You will be prompted for a username and password – enter you admin username and password for Office 365/Exchange Online.

Type in the session variable creation command:

$Session = New-PSSession -ConfigurationName
-Credential $UserCredential -Authentication Basic -AllowRedirection

And then issue the session import command:

Import-PSSession $Session

Here’s a screen shot after issuing all 3 commands:


You will then see a bunch of stuff being downloaded and will eventually return to the command prompt.

You are now connected and can start issuing commands. For a list of commands available this is a good article:

You can use a command like:

Get-MailboxPermission Fred

To test connectivity – this will list the permissions for user Fred (

The command:

Get-RecipientPermission "Fred Bloggs"

Will list the permissions on the contact we created above – there shouldn’t be any at this stage.

To give Send As permission to the contact issue this command:

Add-RecipientPermission "Fred Bloggs" -AccessRights SendAs -Trustee "Fred"

This gives the user Fred ( permission to Send As the contact “Fred Bloggs” (

You may receive an error at this point along these lines:

You can't use the domain  because it's not an accepted domain for your organization.

This means the domain verification and adding process has not completed yet – can take up to 4 hours for this to complete. If you continue to get this error after 4 hours then something must have gpne wrong with the domain adding process.

If all is ok you should be prompted for confirmation – select ‘Y’ to add the permission.

That’s it!

You should close the session properly – otherwise it will stay open – by issuing:

Remove-PSSession $Session

You can now close Powershell.

In Outlook or Outlook Web Access create a new email, make sure you can see the From: option (In Outlook if it’s not there go to the Options menu and click the From button), type in the email address you want to Send As – – you only need to do this once, outlook will remember it from then on and you can select it from the pull down list (however, at time of writing it was not saving it in outlook web access). Compose your message and send – if you have forwarding setup as described above you should then receive the message and note that the from address is indeed as expected:

When you reply to messages received you will need to choose the from address from the pulldown – it defaults to the main mailbox from address – – there is no way of changing this behaviour that I know of.

My Outlook 2010 address checking settings

I don’t know about you but i get very annoyed by Outlook’s address autochecking features – especially on my work machine which is connected to an Exchange server.

I find that it incorrectly assigns the wrong contact automatically and I have sent emails to the wrong contact on many occasions. This is mainly due to it assuming that the last contact you sent to must be the one you want to send to now. This means the dialog box that used to pop up in Outlook 2003 to confirm which duplicate user to send to is no longer valid as it has already resolved the contact – not what I want to do!

Here’s how I set my Outlook up:

Turn off suggested contacts located under Options (click on the file menu and choose options from the left), Contacts section:


Untick ‘Automatically create Outlook contacts…..’

Next, Turn off AutoComplete under Options, Mail, Send Messages section:


Untick the ‘Use Auto-complete list to…..’

Next, goto the Address Book from the Home menu:


Goto Tools, Options and make sure you only have All Users set:

I find these settings ensure happiness 🙂


If you have already been using Outlook for some time then you should do the following as well:

In addition you should clear your suggested contact address books – goto contacts, select Suggested Contacts, Select all and right click and delete.

Also, it was pointed out to me that you should clear the Outlook cache by starting outlook from the Start Run menu like this:

Outlook.exe /clearautocompletecache

Error synchronizing outlook to exchange server

Getting the following error email in the sync log folder within Outlook connected to an Exchange 2003 server:

12:27:02 Synchronizer Version 11.0.8200

12:27:02 Synchronizing Mailbox ‘mailbox name

12:27:03 Synchronizing server changes in folder ‘Inbox

12:27:03 Downloading from server ‘exchange server name

12:27:04 17 item(s) added to offline folder

12:27:04 11 view(s)/form(s) added to offline folder

12:27:04 Error synchronizing folder

12:27:04 [8004010F-501-8004010F-0]

12:27:04 The client operation failed.

12:27:04 Microsoft Exchange Server Information Store

12:27:04 For more information on this failure, click the URL below:


12:27:04 Done

The only way around this was to redo the outlook profile – delete your email settings under Account Settings and add a new profile.

If neccessary delete the local OST file as well. This can be found at:

For Windows XP:

C:Documents and Settingsuser nameApplication DataMicrosoftOutlook

For Windows 7:

C:Usersuser nameAppDataLocalMicrosoftOutlook


Inserting HTML into an Outlook Email

You have created something in Word and saved it as an HTML file or you have received HTML content that you want to send out as an email. But, when you copy it into an Outlook email you just get the HTML code displaying – it does not render the HTML to give you the final page look you want.

It’s really simple but not immediately obvious how to do this in Outlook:

1. Create a New message

2.  Hit the paper clip to attach a file

3.  Select your source html file

4. Once selected the Insert button activates

5.  To the right of the Insert button select the down arrow

6.  Select Insert as Text

Your new email message is now rendering the HTML.