add method for sending mail with lower memory usage