I am thinking of this as a two part project. Part 1 is is the string manipulations of removing the characters starting with @ and to the right, and then extracting the remaining characters but splitting them at a delimeter such as period or underscore (assuming such a delimeter exists). So "john.lewis@gmail.com" becomes "john" and "lewis". I will leave it to someone adept at string manipulation to advise on this.
Part 2 is then determining gender and ethnicity. In the US, the Social Security department compiles a list of first names by gender. See the package gender. This will permit probabilities of gender by first name; for example Madison as a first name has a 98.5% probability of being female based on this database. Of course, if your data is not US, you would need some other database to identify gender.
The package rethnicity will predict ethnicity. I don't know the source of its data.
An interesting dilemma is that even separating "john.lewis@gmail.com" into "john" and "lewis", we don't know which is the first name and which is the last. I don't know how to resolve this one.