Looks up for the MX DNS records of the recipient SMTP server

def query_mxrecords(self):
        """
        Looks up for the MX DNS records of the recipient SMTP server
        """
        import dns.resolver
        logging.info('Resolving DNS query...')
        answers = dns.resolver.query(self.domain, 'MX')
        addresses = [answer.exchange.to_text() for answer in answers]
        logging.info(
            '{} records found:\n{}'.format(
                len(addresses), '\n  '.join(addresses)))
        return addresses