title: ActiveX - Automation Server Can't Create Object
body: <p>I have a web page from which I need to send an email to. I need to send a LARGE email from the browser. Because the content is larger than the query string allows, I need to rely on Active X. I want to send this email through Outlook. In an attempt to do this, I've written the following code:</p>
  
  <pre><code>try {
    var to = "";
    var cc = "";
    var subject = "Action Required";
    var body = GenerateEmailBody();
  
    var outlook = new ActiveXObject('Outlook.Application');
    var outlookNamespace = outlook.GetNameSpace('MAPI');
  
    var message = outlookNamespace.CreateItem(0);
    message.Display();
    message.To = to;
    message.Subject = subject;
    message.Body = body;
    message.GetInspector.WindowState = 2;
  } catch (err) {
    alert("Unable to send email. " + err);
  }
  </code></pre>
  
  <p>When I execute this code, I get the following error:</p>
  
  <pre><code>ReferenceError: ActiveXObject is not defined 
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks!</p>