Mail Recipients

Recipient Triggers Template Code
submission_submitter sub_manual_post_requested {{submission.submitter}}
    def gather_submission_submitter(self, **kwargs):
        """
        Returns a list of name and email, e.g.: [ 'Ano Nymous <ano@nymous.org>' ]
        """
        addrs = []
        if 'submission' in kwargs:
            submission = kwargs['submission']
            if '@' in submission.submitter:
                addrs.extend( get_email_addresses_from_text(submission.submitter) )
            else:
                try:
                    submitter = Alias.objects.get(name=submission.submitter).person
                    if submitter and submitter.email():
                        addrs.extend(["%s <%s>" % (submitter.name, submitter.email().address)])
                except (Alias.DoesNotExist, Alias.MultipleObjectsReturned):
                    pass
        return addrs