Hi all,I have been looking through other posts to try to piece together a solution but have not had the luck I hoped. Wondering if someone can review my code here and let me know where I am going wrong. I basically have a table with 4 fields:PO Number, Shipment Number, Tracking Number, EmailI am hoping to cycle through each row of this table and send an email to the address in the 4th field with the information in the first 3. Even if 2 rows have the same email address, I would want 2 separate emails. Doesn't seem to hard, but still struggling. Right now, it is sending one email to the first address with all the records in the table in the email. Below is my current codeDECLARE @xml NVARCHAR(MAX)DECLARE @body NVARCHAR(MAX)DECLARE @Shipment NVARCHAR(MAX)DECLARE @TrackingNo NVARCHAR(MAX)DECLARE @Email NVARCHAR(MAX)DECLARE EmailCursor Cursor for (select [SHIPMENT], [TRACKING_NO], [E-Mail]FROM AME_TRACKING_EMAIL)open EmailCursorFetch next from EmailCursor INTO @Shipment, @TrackingNo, @EmailWhile (@@FETCH_STATUS = 0)BeginSET @xml = CAST((select [External Document No_] as 'td','', [SHIPMENT] as 'td', '', [TRACKING_NO] as 'td'FROM AME_TRACKING_EMAILFOR XML PATH('tr'), ELEMENTS ) AS NVARCHAR(MAX))SET @body ='<html><body>Blah blah blah' SET @body = @body + @xml + '<br> More blah blah blah </body></html>'USE msdbEXEC sp_send_dbmail @profile_name='Profile', @recipients = @Email, @subject = 'Your Order Had Shipped!', @body = @body, @body_format='HTML', @execute_query_database = 'SQL-TEST' FETCH NEXT FROM EmailCursor INTO @Shipment, @TrackingNo, @EmailENDClose EmailCursorDeallocate EmailCursor