prepare.pm: modified to contain auto-emailing on success or failure of building next