Importing emails to database