We have a stored procedure that is supposed to check db and select all records where sentFlag is No.

Once record(s) found, the stored proc invokes sp\_send\_dbmail with passed parameters and then sends an email to affected individuals.

This appears to work. 

The issue we are having so far though is that each indivual is receiving duplicate emails.

Any ideas what part of this code could be causing this?

```
 OPEN MAIL_CURSOR

 FETCH MAIL_CURSOR into @mail1, @sender,@content1

 WHILE @@FETCH_STATUS = 0
 BEGIN

    SELECT @email = @email+';'+Email
    FROM GRVRIEVANCES
    WHERE sentFlag = 'No'

EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'Grievances', 
@recipients = @email, 
@subject = 'Account Details',
@body = @content1;

 FETCH MAIL_CURSOR INTO @mail1, @sender, @content1
 END

 CLOSE MAIL_CURSOR
 DEALLOCATE MAIL_CURSOR
 END

```