I am trying to use the SurveyMonkey API to send email surveys and I have hit many issues. The latest one is that the API will not allow email addresses with a plus sign (e.g. [email protected]). The send_flow response will have the email in the invalid_emails list. I've tried the same email on the website and I am able to add it as a recipient, so this is a validation issue on the API only. This issue makes it very hard to use the SurveyMonkey API to reliably send email surveys.
Invalid email when sending through SurveyMonkey API
549 Views Asked by user1002083 At
2
There are 2 best solutions below
1

The plus-sign in email addresses is used as a 'address tag':
Some mail services allow a user to append a tag to their email address (e.g., where [email protected] is the main address, which would also accept mail for [email protected] or [email protected]).
You can safely remove the text between the '+' and the '@', inclusive of the '+', and the email can be delivered.
For example:
[email protected]
should be parsed to
[email protected]
In python, you can easily do this
>>> a = '[email protected]'
>>> a.split('+')[0] + '@' + a.split('@')[-1]
'[email protected]'
Using email addresses with a plus in them was only recently allowed via SurveyMonkey's user interface. It will take some time for the API to catch up.
You can very reliably send email invitations using the API for email addresses which do not contain pluses.