import json
from pingCheck import pingCheck

class checkMail(pingCheck):
    
    def runCheck(self,config, debug):
        mail1=config["environment"]["smtpIP"]
        if not self.pingIP(mail1):
            self.addWarning("Unable to ping Mail Server %s.  Please verify the IP address." % mail1)

        return 0
    
    def getHumanName(self):
        return "Check if mail server is alive"
