Also, update email examples to use the context manager version of open(). Patch by Baptiste Mispelon.