@classmethod
def get_emails(cls, emails):
    """
        Retruns set of recipient emails under consideration of optins.
        """
    optins = cls.objects.filter(user__email__in=emails)
    known_emails = optins.values_list('user__email', flat=True)
    emails_with_optin = optins.filter(optin=True).values_list('user__email',
        flat=True)
    unknown_emails = set(emails) - set(known_emails)
    return set(emails_with_optin) | set(unknown_emails)
