And just for performance, I substituted table variables for the temp tables (and renamed the variables to fit my team's conventions) ...
USE [master]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[procGetDbMailInformation]
(@intRowCount INT...