This page provides information on use of utility Command line email client in Microsoft (Visual) FoxPro application. 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 Visual FoxPro script: sending email with command line mailer (an easy way to send email from a Visual FoxPro application).

*!* Put this code anywhere in your application,
*!* provided it is executed before you create the email message.
*!* Note that ShellExecute is case-sensitive command.


    DECLARE INTEGER ShellExecute IN shell32.dll ;
    INTEGER hwndWin, STRING cOperation, STRING cFile, ;
    STRING cParameters, STRING cDirectory, INTEGER nShowWin

*!* Define email parameters:

    MyParams = "-FROM john@sender.com -TO john@recipients.com "+ ;
    "-SUBJ FoxPro mail -TEXT email sent from FoxPro"

*!* Send email:
*!* Example assumes that Febootimail.exe is in %PATH%;
*!* otherwise specify full path to the Febootimail.exe executable.


    ShellExecute(0,"open","febootimail.exe",MyParams,"",1)

*!* That's all - first e-mail message is sent.
*!* For information on how to send e-mail messages with attachments, UTF-8,
*!* and all other features, see Febooti Command line email Online help:
*!* www.command-line-email.com/online-help/

Sample Visual FoxPro script: sending email using mailto command. This method have some disadvantages - Outlook or Exchange must be installed. User can modify mail message before sending or even cancel the sending process. Also, it is not suitable for creating very long messages or messages with formatted HTML text. It is not possible to attach attachments to the email message.

*!* Declarations:
    Declare Shell Execute

    DECLARE INTEGER ShellExecute IN shell32.dll ;
    INTEGER hwndWin, STRING cOperation, STRING cFile, ;
    STRING cParameters, STRING cDirectory, INTEGER nShowWin

*!* Preparing to send email:
    MyMail = "mailto:john@recipients.com"+ ;
    "?CC=tom@recipients.com&Subject=some%20subj"+ ;
    "&Body=Message%20text..."

*!* Send e-mail:
    ShellExecute(0,"open",MyMail,"","",1)

*!* Second email message is sent.
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 FoxPro (Microsoft Visual FoxPro) in order to use these email sending examples.
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