check for internet connectivity before mailing