print_to_mail was not wrapped properly