'Decode base64 mail creds'

def mail_decode(self, src_ip_port, dst_ip_port, mail_creds):

    try:
        decoded = base64.b64decode(mail_creds).replace('\x00', '    ').decode('utf8')
        decoded = decoded.replace('\x00', '    ')
    except TypeError:
        decoded = None
    except UnicodeDecodeError as e:
        decoded = None
    if (decoded != None):
        msg = ('Decoded:    %s' % decoded)
        self.printer(src_ip_port, dst_ip_port, msg)
