add mailtest script and fix To/From reversal