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?

Thanks
Email-setup.JPG
LVL 1
David HuismanAsked:
Who is Participating?
 
Michal ZiembaConnect With a Mentor IT System ArchitectCommented:
You have a mistake in the server name. Please correct it and everything should work fine.
mistake.png
0
 
Michal ZiembaIT System ArchitectCommented:
Hi,
  1. Can you ping the smtp.office365.com?
  2. If yes, try to telnet the smtp.office365.com 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?
0
 
David HuismanAuthor Commented:
I get response from command line "ping" to outlook365.com (not sure how or if you can ping a port using "ping").

I am not sure how to enable telnet on Windows server 1026?
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
Michal ZiembaIT System ArchitectCommented:
Great! So far so good. You have a response from the smtp.office365.com

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  smtp.office365.com 25

Open in new window

In return you should see greetings from the e-mail server:
220 VI1PR0302CA0023.outlook.office365.com 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:
quit
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.
0
 
Michal ZiembaIT System ArchitectCommented:
Try also to use this command to see if you are able to connect to the Office 365 mail server on port 587:
telnet  smtp.office365.com 587

Open in new window


If you are not able to establish the telnet session - you might need to check the firewall settings.
0
 
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"
Email-settings.JPG
0
 
David HuismanAuthor Commented:
You are so right, It works NOW. Thank you so much, pleased it is running
0
 
Michal ZiembaIT System ArchitectCommented:
Great! I'm glad it works now.
0
 
Michal ZiembaIT System ArchitectCommented:
I suppose I helped to solved the issue
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.