Set up Send Mail AsHere are Google's instructions for how to set up sending emails from a different address in Gmail:
Step 1: Add an address you own
- On your computer, open Gmail.
- In the top right, click Settings.
- Click the Accounts and Import or Accounts tab.
- In the "Send mail as" section, click Add another email address.
- Enter your name and the address you want to send from.
- Click Next Step.
- Enter the SMTP server (for example, smtp.domain.com) and the username and password on that account.
- Click Add Account.
- Sign in to the account you added.
- Open the confirmation message you got from Gmail.
- Click the link.
- In the message, click the "From" line.
(If you don't see this, click the space next to the recipient's email.)
- Select the address to send from.
Uh-oh, errorsWhen it works, it is a thing of beauty. The problem is that for some email addresses, these default steps do not cut it. This is particularly the case for Microsoft Exchange or the newer Office365 email addresses. Users with Microsoft work email addresses tend to run into trouble at step 1.7 when attempting to specify the SMTP server.
I have come across two errors. The first appears when using the default SMTP address without making any changes:
Couldn't reach server. Please double-check the server and port number.
Another error message came up when I used the recommended SMTP server for Office365 users (which is smtp.office365.com):
Authentication failed. Please check your username/password.
Server returned an error: "334 VXNlcm5hbWU6 334 UGFzc3dvcmQ6 535 5.7.3 Authentication unsuccessful [CY4PR16CA0035.namprd16.prod.outlook.com] code(535) "
Some people claim to have come across an error saying Server response: read error code(0), although I have not seen that error, myself.
So, what's the problem?The problem is obviously that I was not specifying the correct SMTP server. You might think that the first step should be to contact IT support at work to obtain the correct SMTP address. IT Support do not understand what you are trying to do. They might tell you to use the recommended email client (most likely Outlook). You re unlikely to find a solution this way.
For me, this was very frustrating and led to a lot of searching and trawling through forums, trying to find a solution. The issue arises from the fact that the recommended SMTP server (smtp.office365.com) is not the final destination, but rather redirects to another SMTP server address based on your location (similar to how typing in Google.com will redirect you to Google.co.uk in England, but to Google.com.au in Australia).
How to find your Office365 SMTP serverIn order to find your SMTP server, you must ping the smtp.office365.com address. And it is really easy to do.
On Mac, open Network Utility, click on the Ping tab, then enter the network address to ping, and click the Ping button. After a few seconds, a report will be generated, and at the top it will output something like this:
Ping has started…
You could also open a Terminal window and type ping smtp.office365.com and then press Enter. After a few seconds it will start generating output. On the top line will be something like this:
On Windows, open a Command Prompt window and type ping smtp.office365.com and then press Enter. It will start generating output, and the top line will look something like this:
My particular SMTP server is outlook-au.office365.com. Entering this address as the SMTP server, my full Office365 email address as the username, and password worked when adding my Office365 address to Gmail.