Fixed an oversight with delivering completed files by email, and added a sample covering this case.