Fix #831
Test case for #831
Merge pull request #832 from sjinks/issue-831

Honor setFileToSend()