Fixing send_email. Deleted distinct from input.query.
Added distinct function.
Added verify code.
Added distinct in input.