title: MailDefinition/MailMessage and basepath cannot be null
body: <p>I'm creating a <code>MailMessage</code> with the code below and I'm receiving this error when calling <code>mail.CreateMailMessage</code>.</p>
  
  <blockquote>
    <p>Value cannot be null. Parameter name: basepath</p>
  </blockquote>
  
  <p>Anyone know what could be wrong?</p>
  
  <pre><code>public void SendReciept(string reciever)
      {
          MailDefinition mail = new MailDefinition();
          mail.IsBodyHtml = true;
  
          mail.BodyFileName = "~/file.txt";
          mail.Subject = "Subject";
          mail.From = "noreply@xxx.com";
          mail.Priority = System.Net.Mail.MailPriority.Normal;
  
          MailMessage message = mail.CreateMailMessage(reciever, RecieptReplacements, new System.Web.UI.Control());
  
          ...
      }
  
      ListDictionary RecieptReplacements
      {
          get
          {
              ListDictionary replacements = new ListDictionary();
  
              replacements.Add("&lt;%Name%&gt;", "Name");
  
              return replacements;
          }
      }
  </code></pre>