How to test office365 smtp is working?

Soldato
Joined
6 Jan 2006
Posts
3,406
Location
Newcastle upon Tyne
We use some software that needs to send email via SMTP but when I set the details up it comes back with an error to say the connection to the server has failed. A gmail email address works fine so its something to do with exchange/365.

Is there anyway I can test to see if its the program or 365 causing the problem? We connect to the Exchange server with outlook which has always worked fine.

Could there be a firewall or port issue with the draytek router?

Any other suggestions appreciated thanks.
 
You can always use telnet on port 25, it's basic but works - there are various guides available on how to actually 'talk' to the server at the other end.

If you want to actually attempt to send an email, I'd use blat. It's command line, but is pretty easy to use and handy for testing with the bare minimum of client.

There are all sorts of things that could be the problem; firewall rules, access control on the relay, AV blocks. Hopefully one of the above methods will shed some more light.
 
I couldnt work out telnet or blat but tried another smtp sender and using exactly the same details it sent an email no problem so I have to assume that its the program thats the problem?
 
Thank you both for the replies, I will read the technet article later on this evening.

I had a look on the mxtoolbox websiter and ran a mx lookup for the smtp server that office 365 have provided - smtp.office365.com and it returns the following results:

ype Domain Name Canonical Name
CNAME outlook.office365.com lb.geo.office365.com
CNAME smtp.outlook.office365.com outlook.office365.com
CNAME smtp.office365.com smtp.outlook.office365.com

I have been entering the smpt details as smtp.office365.com into the software but the above Cname comes back as smtp.outlook.office365.com. Could hat be anything?
 
Would it be possible for you to tell us what software you are using?

Do you have any options to enable TLS?

Can you log into outlook web access and go to account options > Settings for pop imap and smtp and write the smtp results into here?

Cheers Marky.
 
In the settings there is a check box for "Use SSL/TLS" - which I have selected but also tried without.

The settings from the web access are as follows:

Pop setting
Server name: outlook.office365.com
Port: 995
Encryption method: SSL

IMAP setting
Server name: outlook.office365.com
Port: 993
Encryption method: SSL

SMTP setting
Server name: smtp.office365.com
Port: 587
Encryption method: TLS

Thanks again for your help

EDIT - The software asks for the following:

Host - smtp.office365.com
Port - 587
Use SSL/TLS - yes
Username - I assume this is just my email address?
Password - double checked
Senders email - my email
 
Last edited:
Ive had a look through the program folder and the roaming app folder and cant see anything that relates to an email log. I'll give them a call and see if they can point me in the right direction.
 
Yeah that'd be the best bet from now on as it appears as though your SMTP settings are all correct.

It maybe an external routing issue; what is the nature of your network? Do you have any firewalls?
 
Theyve asked me to send the developer an email so will let you know what they come back with.

The network is pretty simple. All computers plug into the same switch which is connected to a Draytek Vigor 2920n (which has a fixed IP from the business centre I am in) Maybe it would be worth checking another internet connection in another room that doesnt have a fixed IP perhaps?
 
Ah, I have worked with 2920n routers before - they are "Security Routers" with essentially a built in firewall.

It looks like that maybe your issue, investigate into adding an exception into the routers settings.

If you need any help with this just ask.

Do you mean that all the computers connected to the Draytek have a STATIC IP? If so that shouldn't affect the SMTP traffic, it's more likely that the traffic is being blocked by an outgoing rule enabled on the router.
 
Thanks I will look into the router exception.

No, all computers have a dynamic IP issued by the router but the router has a fixed external IP address for the internet (not sure of correct terminology but basically I can access the router/network remotely from that IP address)
 
Just whitelist the public IP and don't bother with authentication. Use your firewall to control access to outbound SMTP so you don't get a client relaying through your mail server.
 
...tried another smtp sender and using exactly the same details it sent an email no problem....

If you've tried an 'SMTP sender' app and it worked then i'd assume it's something to do with Moneysoft Payroll Manager rather than Office365 or the Draytek - infact, i've used the exact same setup, 2920n and using a Office365 account's SMTP, for router/server/software notifications in a few locations without issue.

I'd double check the Office365 account in a email app using the SMTP settings and see if it'll send mail and similarly it might be worth setting up a dummy GoogleMail/Hotmail/Yahoo/simple mail account on web hosting/etc account and seeing if Moneysoft Payroll Manager will send mail using the dummy account.
 
Back
Top Bottom