Help with SMTP server Windows Server 2016

I have a finance package being hosted on Windows Server 2016 that can send quotes etc direct to clients by email.
My email account is set up using outlook365 (online) and I also have Outlook 2016 install on this server.

The Outlook 2016 client runs fine on the server, I can send and receive email via my online outlook 365 account.
However, I am having trouble sending email from the finance package. When I use the server settings I found online for outlook 365 I keep getting a "Host Not Found" error from the software.

What do I need to do to be able to connect with the outlook email server? Do I need to enter something else that uses a localhost type address that outlook client must be using or do I need to install some form of smtp server on the Windows server machine to be able to send?

David HuismanAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Michal ZiembaIT AdministratorCommented:
  1. Can you ping the
  2. If yes, try to telnet the on port 25. Does it accept the connection?
  3. If yes, try to use the email address from the field "User Name" in the  "Reply-To Email Address". Office 365 might not accept messages where reply-to email address is different than email address used for authentication

Let us know if this works?
David HuismanAuthor Commented:
I get response from command line "ping" to (not sure how or if you can ping a port using "ping").

I am not sure how to enable telnet on Windows server 1026?
Michal ZiembaIT AdministratorCommented:
Great! So far so good. You have a response from the

To use telnet client in Windows 2016 you need to add this feature. You can run this command from the command line to enable the client:
dism /online /Enable-Feature /FeatureName:TelnetClient

Open in new window

Or if you prefer PowerShell, you can run this command:
Install-WindowsFeature -name Telnet-Client

Open in new window

When the client is enabled, please run the following command from the command line:
telnet 25

Open in new window

In return you should see greetings from the e-mail server:
220 Microsoft ESMTP MAIL Service ready at Wed, 10 Jan 2018 21:11:06 +0000

Open in new window

You can quit the opened telnet session with the quit command:
221 Closing connection. Good bye.

Open in new window

When this works, then I would suggest checking the last hint - try to use the email address from the field "User Name" in the  "Reply-To Email Address" in your finance package settings.
The Five Tenets of the Most Secure Backup

Data loss can hit a business in any number of ways. In reality, companies should expect to lose data at some point. The challenge is having a plan to recover from such an event.

Michal ZiembaIT AdministratorCommented:
Try also to use this command to see if you are able to connect to the Office 365 mail server on port 587:
telnet 587

Open in new window

If you are not able to establish the telnet session - you might need to check the firewall settings.
David HuismanAuthor Commented:
I have tried the telnet connection and I get the success results as you mentioned ok.
 The response is successful for both port 25 and 587. If I attempt with invalid port then it does not connect, so this connection is working correctly.

I used same username as reply-to address but still get error "Failed to send email with error: SocketException occurred. InnerException message follows: No Such host is known"
Michal ZiembaIT AdministratorCommented:
You have a mistake in the server name. Please correct it and everything should work fine.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
David HuismanAuthor Commented:
You are so right, It works NOW. Thank you so much, pleased it is running
Michal ZiembaIT AdministratorCommented:
Great! I'm glad it works now.
Michal ZiembaIT AdministratorCommented:
I suppose I helped to solved the issue
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2016

From novice to tech pro — start learning today.