Question: After a few weeks of using El Capitan seemingly random messages started appearing blank. Viewing the messages in the Google web interface showed that they were not blank.

Restarting the app usually fixes it.

I deleted all my emails (by deleting mail folder ~/Library/Mail) and started again - and it was OK for about a week - and now it's started doing it again. Rebuilding mailboxes doesn't help.

I found links around the web to cases of this back in 2010/2011 - like this
<https://discussions.apple.com/thread/2364054>

But it appeared to go unsolved.

Is this just a bug in El Capitan - and is there a solution?

Answer: 
To fix this issue there are two ways:

1. **Rebuild**

To rebuild a Mailbox in Mail, select the mailbox you want to rebuild and click on the Mailbox menu; at the bottom there is the Rebuild option. Repeat this step for each one of your Mailboxes.

It can take few hours to reindex a large mailbox and if it's an IMAP or Exchange mailbox, the rebuild will have to download again everything from the server.

2. **Reindex**

It is also often necessary to manually reindex Mail messages after a major OS upgrade. This is also necessary if Mail becomes unresponsive and/or if search is not functioning correctly or the app doesn't run.

1. Quit Mail if it’s open.
2. From the terminal run 

```
mkdir ~/Desktop/backup
mv ~/Library/Mail/V2/MailData/Envelope\ Index*  ~/Desktop/backup`

```

(replace V2 with V4 for Sierra).
3. Launch Mail and it will build new Envelope Index files; that can take a long time if there are many messages to reindex and if it's an IMAP or Exchange mailbox, the rebuild will have to download again everything from the server.

If everything seems to be working correctly, you can now delete the backup from from your desktop (`rm ~/Desktop/backup`).
I have this problem infrequently. Quitting and restarting mail.app fixes it and just takes a second. Another quick and dirty solution is to click on email forward which will let you see the email contents right away.