CmdEmail is command line e-mail
component, it can be integrated into application that
developed by multiple language.
This article demonstrate how to integrate CmdEmail
into oracle forms, enables oracle forms to send rich
formated e-mail. Note: Since CmdEmail
require Windows platform, if your forms is not running
on Windows server, this article may be useless for you.
How to send mail from Oracle Forms
There several ways to send mail through oracle
-- Using javabean
-- Using Ole component
-- Using utl_smtp
-- Using CmdEmail
In this page, we only introduce the last
way, a simple and effective way to send email through
oracle form, using the CmdEmail send mail component.
If you want to try other solutions, please
refer to documents of Oracle Forms or search google
for related topic.
- Easy to manager
- Support attachment
- support email in html format; you can insert picture into email
- Only require TCP/IP protocol installed
HOW CmdEmail WORKS
CmdEmail support command line interface, you call the program
through command line. Supposed you have configed the program,
you can send e-mail to somebody just use a dos command. e.g.
The CmdEmail read the e-mail addr. of recipients, and
then send a blank message to the recipients. The recipients
firstname.lastname@example.org (if exists) will receive a mail sent
Need to specify the subject and mail body?
Okey, please create a message file and pass the file
path to CmdEmail .
The messae file includes two parts, header and body.
Header : Specify the recipients, subject,
location of attachment etc.
Body Text: The content of the email.
There is a empty line between header and body. The following
is an example:
First line of the body.
Save the text above to C:\temp_name.txt . Run CmdEmail again,
CmdEmail will read information from the message file,
then send a mail to email@example.com, copy to firstname.lastname@example.org.
Installation and Setup
- Download latest version from www.lv2000.com
- Decompress installation pack to the folder where
you want to install the application files.
We suggest you to install CmdEmail to windows PATH so
that it can be called from any current working directory.
- Setup your default email account settings.
How to setup e-mail account
Run this command line:
CmdEmail Settings dialog will appear.Please
input the information given to you by your Internet
Service Provider (ISP) or administrator.
Your Name: Friendly name of the addresser.
Your email address: The addresser of the mail.
Outgoing SMTP server: Please refer to your ISP
or network administrator.
Port of SMTP server: Default 25
Read receipt requested: For MS outlook
User Name: User name used to login the smtp server.
Password: Password used to identify the user.
Note: Unless your ISP have indicated that your service
uses Secure Password Authentication, do not select the
"my outgoing server requires authentication"
Test the email account setting
Please do some testing after setting e-mail account.
Please use CmdEmail to send a mail manually.
CmdEmail will print error message if run into any error;
the error will be saved into smerror.log
How to call CmdEmail from oracle form
You can call CmdEmail from oracle form through HOST
We have created an example demonstrate how to use HOST
procedure to run CmdEmail. Please download the form
Screenshot of the form:
Sample code of sending mail via oracle forms
--How to create message file.
Please use TEXT_IO to create the message file.
--How to call CmdEmail. Please use
HOST procedure to run CmdEmail.
Change the path
v_file_path := 'd:\emailmsg.txt' ;--TODO:
if :mailto is null then
message('Please enter the email address of the recipients');
-- write header
the message file when the mail is sent successfully.
delimiter between header and body
-- write body
If you the mail is not sent to recipients, CmdEmail
will log the error message to this file: smerror.log
, please open the log file via notepad.exe and view
the error message.
Feedback, questions and bug reports are welcome and should
be sent to the customer support, at email@example.com.