updated mail (added attachment and fixed authorization)
updated stored functions
added copy()
updated tests