simplifying mail logic.  Now will setup mail if the environmental variable  $SMTPSERVER is not null.  Will take $DOMAIN as well, or if null, construct it from $SMTPSERVER