title: Could not generate mail report.An exception occurred while executing a Transact-SQL statement or batch.Supply either @id or @name
body: <p>In SQL Server 2005 I have a maintenance plan set up to back up databases. I have a notify task. I am getting a blank email. The maintenance job history shows the error:</p>
  
  <p>Could not generate mail report. An exception occurred while executing a Transact-SQL statement or batch.Supply either @id or @name.</p>
  
  <p>I have set up database mail, I have enabled alerts in SQL Server Agent. I have set a default profile. I have restarted the agent.</p>
  
  <p>Test emails from database email do work properly.</p>
  
  <p>What do I do to troubleshoot and resolve this error?</p>