Using the dmemail Utility

This topic explains how to use the dmemail utility for processing and sending notification emails.

In this topic:

- About_dmemail

- Security

- Command-Line_Syntax

- dm.cfg_Parameters

About dmemail

The dmemail utility is a command that processes queued notification events held in the Dimensions CM database and turns them into actual emails. It is responsible for expanding the email templates with the mail content and sends the resulting email to end users.

Modes of Operation

dmemail is a command-line utility that you can run in the following ways:

- Direct from a command prompt.

- Automated via an existing customer scheduling system, such as cron.

- Automated via the Dimensions listener itself.

Security

You need to run dmemail from a user account that is part of the Dimensions ADMIN group. When dmemail is scheduled using the Dimensions Listener, it will run as the same user as the dmpool process, which is specified in this file:

- Windows: %DM_ROOT%\dfs\listener.dat

- UNIX: $DM_ROOT/dfs/listener.dat

Command-Line Syntax

The command-line syntax for this utility is:

dmemail [config-file]

if config-file is omitted, it defaults to:

- Windows: %DM_ROOT%\dfs\email_config.dat

- UNIX: $DM_ROOT/dfs/email_config.dat

Other parameters can be either specified as part of the command line or entered in the configuration file. For details about the parameters, see Configuration Parameters.

Subsequent parameters when entered on the command line are used as key-value pairs. To use the default configuration filename and have parameters, use "-" as parameter 1.

Parameters entered on the command line take precedence over those options specified in the configuration file.

If you need spaces in the parameters, use double quotes. The parameter names are not case-sensitive, and values of Y/y and N/n are equivalent.

Examples

dmemail

dmemail -?

dmemail - debug=y logging=n "hello = greetings tim"

dm.cfg Parameters

The following entries are required in the dm.cfg file.

Variable | Description
DM_TMP | Dimensions CM temporary file folder. This is used as default for working files, if other (email-specific) options are not specified.
DM_MAILS | Symbol used by existing Dimensions email system to interface with an Operating System mail command. For details, see the chapter on general administration in the Administration Guide.
DM_MAILS_HTTP | Custom version of the above symbol for use with HTML email. Some mail commands have special options to enable HTML mail. For example, the Dimensions CM supplied program "pcmsmail" needs to be given the "-i" option, which would be specified in this variable. Example of the last two symbols: DM_MAILS %DM_PROG%pcmsmail.exe -h "mail-server.com" -f "PCMS" -file "%%s" -s "%%s" -t "%%s" DM_MAILS_HTTP %DM_MAILS% -i
DM_EMAIL_AUTOSTART_TIMES | This variable is used to control the automatic startup and running of the dmemail application. It specifies the scheduled times that dmemail is required to start processing content. DM_EMAIL_AUTOSTART_TIMES <spec> <spec> <spec> ........ <spec> : XX:YY | +XX:YY XX:YY : process e-mails at exactly XX:YY on the local 24 hour clock. (eg 03:00 will run a 3am local time) +XX:YY : process e-mails every XX:YY hours/minutes, repeatedly. (eg. 01:00 will run every hour)
DM_EMAIL_AUTOSTART_DIR | Working files and a log of activity is recorded in this directory when dmpool is managing the dmemail process. The default is DM_TMP.
DM_EMAIL_MSG_LEVEL | A severity level indicating the level of event that will generate a record in the log. 0 generates the most information. Higher values restrict the messages to more severe events. To see information only about serious errors, set this to 4.
DM_EMAIL_TEMPLATE_DIR | This overrides the default location of the email templates, if required. If not specified, the default location is: Windows: %DM_ROOT%\email_templates UNIX: $DM_ROOT/email_templates

For more details, see the Administration Guide.