# External Mail-Integration

## External Mail Interface - Client or Server side Settings

| The external mail interface can send mails from the client or the server site. Using the server-site sending, you do not need a mail client program. The sending method is set in exm_snd_ext with the variables SERVER or CLIENT. The default setting is CLIENT. Server side sending can only be used with a Workflow.
| Triggers the sending of mail via external mail program. Now supports client- and server-site sending for mail. In case of client-site sending, a mail client defined by Windows operating system is started and can be used interactively. In case of server-site sending, the mail is sent in the background not requiring any user interaction. To use the server-site sending from your LogiView procedure append the " /MAILER=NOTIFIER" string at end of your parameter string for the exm_snd_ext trigger. For client side sending do not append anything. To enable server-site sending, set the variable EDB-EXM-MAILSND-SITE to SERVER in the "DEFAULT DATA" mask. To enable client-site sending, set the variable to CLIENT. If this variable does not exist, you need to create it first.
| ### Starting of the External Mail Interface via Notifier
| To send e-mails via the Notifier the variable EDB-EXM-MAILSND-SITE must be changed to Server.:
| Right click the Agile e6 desktop and open the Defaults list.
| Search for the EDB-EXM-MAILSND-SITE variable and change the value to Server.
| To use the server side site sending of mails via your LogiView procedure, append the "/MAILER=NOTIFIER" string at the end of your parameter string.
| In the context menu click Reconfigure.
| ### Interfaces
| #### CMC (Common Messaging Call)
| CMC is a platform-independent set of functions which makes the application independent of the messaging system, the operating system and the hardware to be used.
| #### MAPI - Messaging API
| MAPI is a set of functions which are used for applications support e-mail to create, edit send and save e-mails. The interface has a development tool with which the purpose and contents of the message are defined and supplies a flexible management of stored messages. MAPI has also a common development interface to supply applications with e-mail support independent of the used messaging system. The MAPI interface is used as a standard but can be changed manually System > External Mail-Interface... To use the MAPI interface with Outlook-Express, Outlook Express must be activated manually for the MAPI application. Select Tools > Options and Outlook Express as a standard program and activate Set Outlook Express as standard client for Simple-MAPI.
| #### Description of possible parameters used in the char string for server-side sending via Notifier:
ATTACHMENTS | "-a" | ATTACHMENTS should be in the same PATH as the FILES. If you use TEXT instead of FILES, you need to set the PATH for ATTACHMENTS. Please, refer also to the configuration parameter EXM-MAX-FILE-SIZE.
ECI_LOOP | "-e" | Eci topic "eci_dde_loop"
PATH | "-i" | The PATH is set always independent of the FILENAME as ATTACHMENTS use the same path.
ENCODING | "-k" | Example: "ISO8859-1".
LANGUAGE | "-l" | Default entry is ENG, also possible is GER.
MIMETYPE | "-n" | Default entry is "text/plain". If you want to use html, set the MIMETYPE to "text/html"
RECIPIENT(S) | "-r" | The delimiter between RECIPIENTS is the comma. RECIPIENTS starting with "CC:" are set to cc. RECIPIENTS starting with "BCC:" are set to bcc.
SUBJECT | "-s" | The SUBJECT of this mail. The default entry is "no subject".
TEXT | "-t" | The mail TEXT. Not required if you use file, see FILENAME. Do not forget to set the PATH for ATTACHMENTS.
SENDER | "-u" | Just the user name!, NOT the email address and NOT the uic.
FILENAME | "-x" | Only the file name where the mail text is stored, NO path.
| Please note that the parameter ENCODING | "-k" | Example: "ISO8859-1" should only be set if the receiver is expected to have set a differend language encoding than the sender. If the encoding is not set, the notifier will detect the language encoding automatically!
| The combination: [-<character>'<string_value>'] defines a complete set with identifier (-<character>) and its value ('<string_value>'). The value is limited by apostrophes (single quotation marks) at the beginning and at the end. If you use an apostrophe within the string_value, the parser will stop parsing at this point. The rest string does not start with an identifier and will be ignored. Because the sender (-u) is set automatically as last parameter before /MAILER=NOTIFIER by the system, it is also ignored!
| #### Description of possible parameters used in the char string for client-side sending:
ATTACHMENTS | "-a" | ATTACHMENTS should be in the same PATH like the FILES. If you use TEXT instead of FILES you need to set the PATH for ATTACHMENTS.
INTERFACE | "-c" | Mail interface CMC or MAPI
DOCUMENT | "-d" | Documents and assigned files
ECI_LOOP | "-e" | Eci topic "eci_dde_loop"
PATH | "-i" | The PATH is set always independent of the FILENAME because ATTACHMENTS use the same path.
RECIPIENT(S) | "-r" | The delimiter between RECIPIENTS is a blank and a slash. RECIPIENTS starting with "/CC:" are set to cc. RECIPIENTS starting with "/BCC:" are set to bcc.
SUBJECT | "-s" | The SUBJECT of this mail. The default entry is "no subject".
TEXT | "-t" | The mail TEXT. Not required if you use file, see FILENAME. Do not forget to set the PATH for ATTACHMENTS.
FILENAME | "-x" | Only the file name where the mail text is stored, NO path.
LOGFILE | "-y" | Log file for debug information (if set to "-y" a log file is created independent of successful or failed mailing). Note: Always set the log file path AND file name - -y'<log-file-path-and-name>.
LOGFILE | "-y" | Log file for debug information.
| ### LogiView Logic model EP_EXTMAIL
| The LogiView logic model EP_EXTMAIL contains different procedures for generating a string with different options and starts the external mail program. The transferred options can define different fields of the mail mask of the called mail service. Other options: -r: Receiver of mail -s: Mail topic -t: Mail text -a: Attachments -e: ECI topic -y: Layout-File (Layout of information on items, documents, ...) -p: Send Flag - Numeric value if dialog box is opened -d: document (for documents only) The ECI topic must be sent to establish the communication between the external mail program and Agile e6 . The ECI communication reads in or out database contents as well as checks out file related to a document as an attached file. Files with the option -a as Attachment must be copied to the temporary directory generated by DataView. To send a mail without opening the dialog box, set the send flag to zero (a receiver must be specified). If several receivers, documents etc. are to be send, they are divided by comma. It is possible to send mails with the option CC or BCC. Naturally CC or BCC do only work when entering one receiver in the field TO. CC or BCC are added to the option -r: -r'recipient_to /CC:recipient_cc1,recipient_cc2,... /BCC:recipient_bcc' -r'recipient_to /CC:recipient_cc' z.B. -r'recipient_to /BCC:recipient_bcc1,recipient_bcc2' Documents and related files are divided by: document:file;document:file,file;document,file A short description of the selected item, document, project is written to a field on server side and copied as a text to the mail tool. A debug file is generated to document possible error messages. The file and the debug file are deleted after the mail was sent successfully.
| ### LogiView Logic model EP_CUS_MAL
| Procedures for generating user-specific layout files. Some exemplary procedures for the entity EDB-ARTICLE (mail item) can be found in ep_root/unsup/dmp/. To execute these functions, import the file exm_sample1.bin and rename EDB_ARTICLE_Layout_Sample1 or EDB_ARTICLE_Sample2 to EDB_ARTICLE_Layout. To read out the user-specific layout files, the procedures for generating layout files must start with the respective entity name.