That error means writing to the stderr stream on your computer failed with a broken pipe. That means either that for some reason your computer is failing to setup a working stderr stream or something is blocking calibre from writing to stderr. The most common explanation is the latter. If you believe it is not that, then you need to figure out why stderr is invalid on your computer.
On OS X >= 10.8, Apple in their infinite wisdom decided to make stdout/stderr non-functional for graphical apps - they no longer appear in Console.app. So calibre redirects them to the ASL service, see
https://github.com/kovidgoyal/calibr...p/site.py#L128
So either the redirection fails and the original stderr is broken or for whatever reason ASL is failing on your machine.
In any case, I have added some code to use an in memory buffer for the email test session instead of stderr, which will prevent that error from happening, regardless of how broken stderr on your machine is.
https://github.com/kovidgoyal/calibr...e1273ec5f9974c