SimpleMail

The command SimpleMail offers a simpler interface compared to the command Mail. This command offers parameters commonly used by email clients.

SimpleMail is implemented as a script component and is part of the built-in KCM Core script library. The script for SimpleMail is available in: <deploy root>\KCM\Documentation\5.8\Resources\Examples\Core Scripting. For more information, see Examples of script components.

Usage

SimpleMail
To (<text>)
From(<text>)
File (<text>)
Host (<text>)
Port (<number>)
CC (<text>)
BCC (<text>)
ReplyTo (<text>)
Subject (<text>)
MimeEncoding (<text>)
Attachments (<text>);

Parameters

  • To: Required. Comma-separated list of recipients.
  • From: Required. The email address of the sender.
  • File: Required. File containing the body of the email message. This file must contain ASCII text and have the .txt extension.
  • Host: Required. The SMTP host.
  • Port: Optional. Port on which the SMTP host is contacted. Defaults to the standard SMTP port (port 25).
  • CC: Optional. Comma-separated list of recipients who receive a carbon copy of the email. These recipients are listed in the header on the CC: line. Defaults to an empty list.
  • BCC: Optional. Comma-separated list of recipients who receive a blind carbon copy. These recipients are not listed in the header. Defaults to an empty list.
  • ReplyTo: Optional. The email address to which replies should be directed. Defaults to From.
  • Subject: Optional. Subject line of the email. Defaults to an empty line.
  • MimeEncoding: Optional. The encoding used to send the HTML part of the body. This setting must match the encoding used to generate the HTML page, but it does not convert the page. Some mail clients use this attribute to determine the encoding instead of the appropriate metadata tags embedded within the HMTL page.
  • Attachments: Optional. Defaults to an empty list. A string containing a comma-separated list of documents that KCM Core attaches to the email message as MIME attachments. The first two of these attachments are the alternative bodies of the email using the rules described in the following table.

File extension first file

File extension second file

Body alternative sent: TXT/HTML*

TXT

HTML

Body alternative sent: TXT/HTML*

HTML

TXT

Body alternative sent: TXT

TXT

Not HTML

* The mail client settings determine which alternative is displayed.

For more information, see Send email with an attachment.

Inline images are supported (Content_ID header support). See HTML inline images.