added export code for email,
which exports all email from the database