Using JScript to send email

Executing febootimail via Windows Script Host. To execute JScript, use CScript or WScript executables. For example: CScript.exe SendMail.js

/* SendMail.js */
  function SendEmail()
  {
    // Set email parameters...
    var mSubj = " -SUBJECT Email from WSH";
    var mText = " -TEXT Example. Text goes here.";
    var mAddr = " -FROM john@sender.net -TO ted@example.com";
    var mServ = " -SMTP your.smtp.server.com";

    // Set Febootimail parameters...
    var mPath = "C:\\Program Files\\Febooti Command line email\\";
    var mExec = "febootimail.exe";

    // Preparing to send...
    var mParams = mAddr + mServ + mSubj + mText;

    // Send email...
    var mObj = new ActiveXObject( "Shell.Application" );
    mObj.ShellExecute( mPath + mExec, mParams, "", "open", 0 );

    // More information about email commands...
    // www.febooti.com/products/command-line-email/online-help/

  }
Resources:

If you have any questions, please do not hesitate to contact our support team.

© 2001–2019 Febooti Ltd.