You shouldn't do this for the simple fact that if a user has entered their email twice like this, then they're expecting them to behave like 2 separate addresses. It's just extra overhead on your platform.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Some validation/sanitization libs support gmail addresses and can treat them as one address.
For example:
test@gmail.com -> test@gmail.com
te.st@gmail.com -> test@gmail.com
For reference: npmjs.com/package/validator
You shouldn't do this for the simple fact that if a user has entered their email twice like this, then they're expecting them to behave like 2 separate addresses. It's just extra overhead on your platform.