Solved: Email not received and no NDR on Office365 Microsoft online

I recently had the problem where a person sent me a zipped file from his gmail account to my email account at Microsoft online/Office365. The email never reached me and the sender never received any NDR (Non Delivery Report). So I thought he hadn’t sent me anything while he was sure I had received it. Luckily in this case, I was expecting an email from him so I got in touch and we could start troubleshooting. How many other emails like this I have not received since I started using Microsoft online years ago, I will never know.

After some troubleshooting including going into Office 365 Admin – Exchange Admin Center – Mail Flow -Message Trace I found the messages and could see that the zip file had incorrectly been deemed as malware. Messages were marked as deleted and not delivered. I opened a support ticket with Microsoft and found out that the default setting in Microsoft online is to just delete emails with suspected malware without notifying anyone about it.

In my opinion this is not the smartest default setting but fortunately you can change it:

  1. Sign in as admin to Office365 Admin at
  2. Go to Exchange Admin Center
  3. Go to Protection – Malware filter
  4. If you have not made changes to the Malware filter before you probably only have one Malware filter rule: Default. Doubleclick it to edit.
  5. Under Settings + Malware Detection Response, I changed from “Delete the entire message” to “Delete all attachments and use default alert text”, this means you as a recipient will receive the msg but without the suspected malware.
    There are also other settings you can change such as Sender Notifications and Administrator Notifications if you lso or instead want the Sender or Admin to be notified.

I hope this helps someone else out!


Set separator delimiter in CSV file to open correctly in Excel


I made a PHP script to export a SQL query (from MySql) to a CSV file for opening in Excel. I cannot control how different users have their Excel setup, ie what separator delimiter they have set (this differs with language settings or user may have changed setting)

So the field separator delimiter gave me some problems, ie Excel would not automatically open file columns correctly but put each row in a single cell, unless you use Import data to make it work.

Some forums suggested setting the separator delimiter in the csv file (delimiter is third argument for fputcsv) to tab (\t) but that did not help.

Solution (use csv header sep=)

Then I stumbled upon the possibility to add a parameter as a header to the actual csv file, simply add sep=<delimiter> to the beginning of your csv file and Excel will parse it. So for separator delimiter use comma (,), pipe (|), tab (\t) or whatever you set in your php code.

However I found a few caveats:

  • “sep=\t” needs to be in quotes (otherwise it will use header but also for some reason also show it as data in the spreadsheet and put it in its own cell and move all other cells on that row one position to the right)
  • You need to add newline \n after the sep= header (otherwise it will use header but also show it as data concatenated with first cells data)
  • Use fwrite as fputcsv will not work

Example to use tab as separator:

[code]fwrite($fp, "\"sep=\t\"\n");[/code]


I could not find much info on the subject of csv headers but this is the full thread that lead me on the to it (thanks Burhan Ali)

Tested with Excel 2016 on Windows 10 and Excel for Mac (15.25) on OSX El Capitan (10.11.15).

I have not tested on other spreadsheets software like OpenOffice, LibreOffice etc, so please share in the comments if you have any success with this.

Troubleshoot email delivery in Exchange on Microsoft Online

I had a problem the other day where I noticed that of all the emails I sent to the same recipient outside my orgianization, some were delivered and some were not. They were not in Junk mail and I did not receive any non-delivery reports.

I find the Microsoft Online user interface to be a little… puzzling … to use a nice word. I have learned that I cannot expect to find any links to the admin interface but have to remember to use my bookmarked url to

Exchange Admin Center (EAC)

Yesterday I learned that I can also access something called the Exchange Admin Center (EAC). From there it is possible to, among other things, run a mail trace for any message sent the last 7 days.

1. Go to (if you, like me, have a separate admin account, make sure you sign in with this)

2. Click Mail flow and then Message trace

3. Fill out the Sender and Recipient information and hit search. Double click any message to see details.

My undelivered emails

From the EAC Message trace I can see that the messages that were not delivered are marked as “Spam” and action set to “Use high risk delivery pool”. It is then set to “Send” and details say “Message transferred from: To_DefaultOpportunisticTLS”.

My best guess is that it means the email is currently in waiting mode and will be delivered or fail some time in the future… I have contacted Microsoft support and will update this post when I get an answer.


Source: Microsoft help article: Troubleshoot email delivery using the Exchange Online message trace tool

8 Quick Steps: Guide to Microsoft Office 365 Exchange Online Free Trial

This guide tells you how to quickly and easily get started with Exchange Online using a 10 user free trial which can easily be converted to a paid subscription later ($6 per user per month, minimum 1 user)

This is how you do it (steps may vary a little bit depending on what country you are from)

    1. Go to
    2. Click “Get the trial”. This will give you a fully functional free 10 user trial for 30 days.
      So this means one month free and you can test everything before you start paying. When the trial period is up, it is easy to turn it into a paid subscription. No rebate coupon or voucher code needed.
    3. Select the option for “Professionals and Small businesses”, this is the “P1” plan. For some countries this may already be preselected.
      (If you are a larger company select the “Midsize businesses and enterprises”, plan “E3” but note that pricing, features etc is different from what is covered here)
    4. Fill out the information about yourself to create a Microsoft Online Services ID.
      You will have to select an domain name, e.g. Don’t worry, you will be able to add your real domain name (or multiple domain names) later
    5. You should see a page telling you that Exchange Online, Lync Online and Sharepoint Online is being set up and that it will take a few minutes. Wait for them to finish.
    6. Add your own Domain. a) Click Admin in the top navigation. From the Admin page on the left column navigation b) Click Management-Domains, then c) Click Add a Domain. d) Enter your domain name and click the Check Domain button. After domain information is shown e) click Next and you will be taken to a page with instructions how to add a TXT record to your DNS for verifying your domain.
    7. Add users. a) Click Admin in the top navigation. From the Admin page on the left column navigation b) Click Management-Users, then c) Click New + User and follow the instructions.
      If you wish, you can make the admin user that was created when you signed up just an admin account without a paid license. To do this edit the user and uncheck “Microsoft Office 365 Plan P1” under License.
    8. Add me as your partner – optional. Thanks! a) Click Admin in the top navigation. From the Admin page on the left column navigation b) click Subscriptions-Manage, then c) click your subscription, Microsoft Office 365 Trial (Plan P1). On the far right you will see d) Partner Information, click Add and e) in the box shown enter 1912364 as partner id to use my company XS Tech as partner and click Ok (or if you prefer to use another partner enter their partner id) Thanks.


Microsofts cloud offering Office 365 (formerly BPOS) includes among other things Exchange Online, Microsofts hosted email offering.
Exchange Online can be accessed from a browser (Outlook Web App), Outlook (Windows), Entourage or Outlook for Mac or any mobile software supporting ActiveSync, e.g. Android, iPhone, iPad, Windows Phone etc.
I find Exchange Online well priced at just below 50 SEK (US$ 6) per month for a 25GB mailbox with Sharepoint, Office Web Apps and Lync also included. It is half the price compared to my current Hosted Exchange provider and with over 10 times the storage. Extra plus for me is also that my Hosted Exchange provider is running Exchange 2007 while Office365 is on Exchange 2010. New with the change from BPOS to Office365 is also that you can now signup for only one single user instead of the previous minimum of three.

I recommend using Internet Explorer or Firefox with Office 365, Exchange Online and other Office Web Apps. Chrome (currently in release 14) is working most of the time but not always.

Disclosure: My company is a Microsoft partner.