title: Script file won't execute after publishing
body: <p>I have a script in my servlet that should run. Before publishing the webapp "Exporting it to WAR file" the script runs, but after publishing it, it doesn't. 
  Any clue ? I use Tomcat 8, JAVA/JSP (Backend/Frontend)
  My script is a python one, it sends automated emails, this is how I call it from my servlet.</p>
  
  <pre><code>   protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
              doGet(request, response);
  
              String[] pythonscript = new String[3] ;
              pythonscript[0] = "C:\\Program Files (x86)\\IronPython 2.7\\ipy64.exe";
              pythonscript[1] = "C:\\Program Files\\Apache Software Foundation\\Tomcat 8.0\\webapps\\myapp\\db_monitor.py";
              pythonscript[2] = "Email:  Comment/Question: Hello ";
              File file = new File("test.log");
              PrintStream ps = new PrintStream(file);
              try {
                  Runtime.getRuntime().exec(pythonscript);
                  } catch (IOException e) {
                  // TODO Auto-generated catch block
                      e.printStackTrace(ps);
                  }
  
          }
  </code></pre>
  
  <p>And this is the script written in Python/IronPython </p>
  
  <pre><code>import clr
  clr.AddReferenceToFileAndPath("C:\\Program Files (x86)\\Microsoft\\Exchange\\Web Services\\2.1\\Microsoft.Exchange.WebServices.dll")
  from Microsoft.Exchange.WebServices.Data import *
  
  
  def main():
      ex_service = ExchangeService(ExchangeVersion.Exchange2010)
      ex_service.UseDefaultCredentials = True
      ex_service.AutodiscoverUrl("me@company.com", redirect_url_validation_callback)
      email = EmailMessage(ex_service)
      email.BccRecipients.Add("me@company.com");      
  
  
      email.Subject = "New Report / Test "
      email.Body = '''A new report has been published'''
      email.Send()
  
  def redirect_url_validation_callback(redirect_url):
      redirect_uri = Uri(redirect_url)
      return redirect_uri.Scheme == "https"
  
  if __name__ == "__main__":
      main()
  </code></pre>
  
  <p>Do I need to modify the paths that I call from the servlet? They are correct as far as I know and tested but when I publish that webapp, the script won't run...</p>
  
  <p>UPDATE: After logging output, I found what errors I was getting:</p>
  
  <pre><code>Traceback (most recent call last):
  
    File "C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\myapp\db_monitor.py", line 26, in &lt;module&gt;
  
    File "C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\myapp\db_monitor.py", line 19, in main
  
  Exception: SendOnly cannot be used by a user without a mailbox.  Use SendAndSaveCopy and specify a folder ID in a mailbox to send an item from an account that doesn't have a mailbox.
  </code></pre>