send email from HTML / send mail from web page

If you are looking for information, how to send email from server side scripts like ASP, PHP, PERL, CGI, please refer to:

Send command line email from PHP scriptSend command line email from ASP scriptSend command line email from MS FoxPro script
Email from PHP, ASP and FoxPro

In this example email is sent from client computer, not from server. This is special case and it works only for local or trusted zone, or if Internet Explorer Security Settings is set to low. Use it only on local intranet. In this example assumed, that you have installed Command line e-mailer in "C:\Program Files\Febooti Command line email\".

Example for mail from HTML web page script:

/**** Febootimail to send email from HTML web page ****/
<script type="text/javascript">

  function SendEmail()
  {
    // Set email parameters...
    var mSubj = " -SUBJECT Email from web page";
    var mText = " -TEXT This email is sent from local web page.";
    var mAddr = " -FROM john@sender.net -TO john@recipients.net";
    var mServ = " -SERVER 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 );

    // Confirmation...
    alert("Email sent!");

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

  }

</script>
Additional Command line email notes and resources:

Please do not hesitate to contact our support department with any possible further questions or to solve practical issues connected with Command line email.

Copyright © 2001-2011 Febooti Software. All rights reserved. Last updated: March 18, 2007