added unit test for sending attachment and docs