fix sendmail format, real sending yet to be tested