This page provides information on use of utility Command line email client in PHP script. Use of standard PHP mail() function which allows you to send mail, is very complicated. By using Febooti Command line email you can:

  • Send email message using plain text or HTML message with embedded pictures.
  • Send unlimited number of attachments.
  • Use return codes to check success or failure.
  • Works on Microsoft Windows (98 / Me / NT / 2000 / XP / Vista / Windows 7 / Windows 8 / Server 2003 / Server 2008 / Server 2008 R2 / Server 2012) including all server versions.
  • And many more options…

Example for PHP script:

/**** Febootimail PHP email ****/
<?php
  // Send e-mail from PHP and output the result.
  // (On a MS Window operating system with
  // the "febootimail.exe" executable in the path).


  $server=' -SMTP smtp.sender.com -PORT 25';

  $body='"This is <I>HTML / MIME</I> e-mail message"';
  $body.='" sent with <B>Febooti Command line email</B>"';

  $subj='PHP mail';

  $command='febootimail.exe -HTML -MIME -FROM web@sender.com ';
  $command.='-TO john@sender.com '.$body.$server;
  $command.='-SUBJ '.$subj.' -BODY '.$body.$server;

  $result=0;

  exec($command,$output,$result);
  echo 'Output: ';
  print_r($output);
  echo '<BR>';
  echo 'Result: '.$result;

  // For detailed information about result codes, see:
  // www.command-line-email.com/online-help/batch-file-errorlevel.html

?>
Additional Command line email notes and resources:
  • Febooti Command line email utility parameters.
  • Overview on how to send email from VBA (Visual Basic for Application) macro.
  • You must be familiar with PHP (PHP: Hypertext Preprocessor) in order to use this email sending example.
Send command line email from MS Excel VBA macroSend command line email from MS Word VBA macroSend command line email from MS Access VBA macro
Email from MS Excel, Word and Access

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-2013 Febooti Software. All rights reserved. Last updated: January 21, 2013