RevisedRevision3:
You must sort both lists on email alphabetically. (If someone knows how to do that, then just copy this answer into yours)join. Given that the email field the 2nd field of file1 and the 1st field of file2:
joinsort -t , -1k 2 -,2 1 file1.csv file2.csv > file3sort1.csv
parameter meaning
sort -t , :-k '1,' is1 thefile2.csv field> separatorsort2.csv
-1 2join :-t file, -1, 2nd2 field
-2 1 : filesort1.csv 2,sort2.csv 1st> fieldsort3.csv
parameter meaning
-t , : ',' is the field separator
-k 2,2 : character sort on 2nd field
-k 1,1 : character sort on 1st field
-1 2 : file 1, 2nd field
-2 1 : file 2, 1st field
> : output to file
produces
email,ID,name
email,ID,name
...
sorted by email alphabetically.
Note that if any email is missing from either file it will be omitted from the results.