I get the following error :
Msg 22050, Level 16, State 1, Line 0
Error formatting query, probably invalid parameters
Msg 14661, Level 16, State 1, Procedure sp_send_dbmail, Line 478
Query execution failed: ?Msg 208, Level 16, State 1, Server MYSERVER, Line 1
Invalid object name 'importedrecords'
Note : select * from importedrecords is a valid query with 'email' as a valid field and it does give me the results when run independently.