Update sendmail function and callers