def METHOD_NAME(modeladmin, request, queryset):
    """
    Admin action for showing a list of email addresses for all users in selected groups
    """
    s = "/".join(str(g.id) for g in queryset)
    url = reverse("mail_list", kwargs={"groups": s})
    return HttpResponseRedirect(url)