Edited
This should work
create proc [dbo].[SendProposalReport] as
declare rscursor cursor read_only
for
select Emails, Prop_Type, count(Matches) as Matches from proposals
group by Emails, Prop_Type
declare @Emails nvarchar (100)
declare @Prop_Type int
declare @Maches int
open rscursor
fetch next from rscursor into @Emails,@Prop_Type,@Maches
while @@fetch_status=0
begin
EXEC msdb.dbo.sp_send_dbmail
@recipients = @Emails,
@subject = 'Example Email',
@body = 'write your message here',
@profile_name = 'ExampleProfile',
@attach_query_result_as_file = 1
fetch next from rscursor into @Emails,@Prop_Type,@Maches
end
close rscursor
deallocate rscursor