title: SQL Server sending mail using xp_smtp_sendmail procedure
body: <p>I have configured my SQL Server 2008 R2 with the following commands and steps.</p>
  
  <ol>
  <li><p>for the mail configuration, I have downloaded <code>XPSMTP70.ZIP</code> and copy <code>xpsmtp70.dll</code> into  <code>C:Program Files\MSSQL\80\Tool\binn</code></p></li>
  <li><p>Then I executed <code>exec sp_addextendedproc 'xp_smtp_sendmail', 'xpsmtp70.dll'</code> in the <code>Master</code> database. I also executed <code>grant execute on xp_smtp_sendmail to public</code> in the <code>master</code> database.</p></li>
  </ol>
  
  <p>But when I run this code to send mail </p>
  
  <pre><code>EXEC master.dbo.xp_smtp_sendmail 
          @TO = 'vipin.v@fingent.com', 
          @from = 'vipinv65@gmail.com', 
          @message = 'fgsdjfgsd sdfsdgfsdg sdjfdsjgh', 
          @subject = 'foo was fired.', 
          @server = 'smtp.gmail.com' `
  </code></pre>
  
  <p>I get an error message </p>
  
  <blockquote>
    <p>Could not load the DLL xpsmtp70.dll, or one of the DLLs it
    references. Reason: 126 (The specified module could not be found.).</p>
  </blockquote>
  
  <p>Please help ....</p>