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:
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.
Please do not hesitate to contact our support department with any possible further questions or to solve practical issues connected with Command line email.