title: Mail-in database
body: <p>I have this scenario (this is an old story of mail-in)</p>
  
  <p>This is a company where have many Domino Mail-in databases. One  for every branch.</p>
  
  <p>Every person in every branch has a personal Notes Email.</p>
  
  <p>The company policy is that each person of the branch can not send email to an external account (internal yes), so I need to use the mail-in database.</p>
  
  <p>I tried with the rules of Domino to perform a block (in the rule you can set the Sender field to track the mail), but it does not seem possible because unfortunately, when a user sends an email from a mail-in database (mail9.ntf template) the sender field is the username.</p>
  
  <p>I know about <a href="http://teammail.openntf.org/" rel="nofollow">Team Mail box project</a>, but this is an old project and I have some problems with HTML outgoing mail and it doesn't work on the web.</p>
  
  <p>I tried looking for a solution, customizing the standard Mail9.ntf template and I discovered that the library "CoreEmailClasses" with the function QuerySave method is executed <strong>Me.m_noteUIMemo.Send()</strong> 
  I have tried to change this code copying the backend document into mail.box the mail...but this doesn't work because it is more complicated (there are TMP field...and I observed that when you use <code>.send()</code> into mail.box the RichText is a MIME-RT) .</p>
  
  <p>The only solution that I have found is to save the email and later with a scheduled Sign Agents to Run on Behalf Of the mail-in user that sends the email (solution that I do not like because is not in realtime).</p>
  
  <p>Do you have any other ideas?</p>
  
  <p><strong>UPDATE FOR INOTES</strong></p>
  
  <p>I've found into the FORMS9_x.nsf the subform
  <em>Custom_MailMemoDictionary_Lite</em> that contains this code. Now I need to understand how to use it</p>
  
  <pre><code> &lt;NotesComment&gt;
  //Use s_MDNToFrom to change the From field in outgoing email.  If
  //s_MDNToFrom is set, need to also provide From field.  Uncomment out the
  //dictionary to enable this
  &lt;/NotesComment&gt;
  &lt;NotesComment&gt;
  &lt;NotesDictionary&gt;
      &lt;notesvar name=s_MDNToFrom value={"1"}&gt;
      &lt;notesvar NAME=From value={"Custom From Field"}&gt;
  &lt;/NotesDictionary&gt;
  &lt;/NotesComment&gt;
  </code></pre>