diff --git a/pwclient/api.py b/pwclient/api.py index de2ab83..b9c21f0 100644 --- a/pwclient/api.py +++ b/pwclient/api.py @@ -6,6 +6,7 @@ import abc import base64 +import email.utils import json import http import re @@ -752,7 +753,9 @@ def _format_person(person): return '' if person['name']: - return f"{person['name']} <{person['email']}>" + return email.utils.formataddr( + (person['name'], person['email']) + ) return person['email'] def _format_user(user):