title: Script to check if mail profile is enabled in SQL Server
body: <p>Does anyone have a script (TSQL or PowerShell) to check if <strong>mail profile</strong> is enabled on a SQL Server? </p>
  
  <p>I noticed we are not receiving mails from a bunch of production servers, because  mail profile NOT being enabled. </p>
  
  <p>I need a script to run across all our prod boxes to check if this feature is enabled. I did some research, but failed to find a script. Thank you so much. </p>
  
  <p><a href="https://i.stack.imgur.com/SbrRz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SbrRz.png" alt="enter image description here"></a></p>