1👍
✅
Pass a list to to
:
import re
# or you can use request.getlist('destination')
# I do not know how you generate the two mail addresses
destinations = re.split(r'[;\s]*', request.POST['destinations'])
EmailMessage(subject, content, to=destinations)
Source:stackexchange.com