def METHOD_NAME(request, pk):
    log_entry = get_object_or_404(EmailLogEntry, pk=pk)
    filename = "tapir_email_{}_{}.eml".format(
        log_entry.user.username if log_entry.user else str(log_entry.share_owner.id),
        log_entry.created_date.strftime("%Y-%m-%d_%H-%M-%S"),
    )
    response = HttpResponse(content_type="application/octet-stream")
    set_header_for_file_download(response, filename)
    response.write(log_entry.email_content)
    return response