Chilkat Software Chilkat Software Chilkat Software
Chilkat Software Chilkat Software

  

  

  

  

  

 

CHILKAT MAIL COMMAND

Send email from a DOS batch script.

This program is no longer available.

Syntax
% MailCommand <options>

Command-line options:

-unlock <unlock-code> Enter the string "30DayTrial", or a purchased unlock code. (required)
-smtp <smtp-hostname> SMTP hostname. (required)
-port <smtp-portNumber> SMTP port number. (required if different than port 25)
-ssl Use implicit SSL/TLS. for the connection. SMTP servers typically listen at port 465 for implicit SSL/TLS.
-starttls Use explicit SSL/TLS for the connection. MailCommand will connect at port 25, but will immediately switch to a secure channel by issuing a STARTTLS command.
-user <smtp-login> SMTP login. (optional)
-pwd <smtp-password> SMTP password (optional)
-sub <subject> Email subject.
-body <body-text> Email plain-text body.
-from <email-address> From email address. Can be formatted as a standalone address such as "support@chilkatsoft.com" or one that includes the friendly name, such as "Chilkat Support <support@chilkatsoft.com>".
-to <email-address-list> Adds one or more recipients. The input string can contains a comma-separated list of email addresses formatted as decribed for the -from property. Example: "Chilkat Sales <sales@chilkatsoft.com>, Chilkat Support <support@chilkatsoft.com>".
-cc <email-address-list> Same as -to, but the email addresses are added to the CC recipients.
-bcc <email-address-list> Same as -to, but the email addresses are added to the BCC recipients.
-log <xml-log-filename> If an error occurs, saves the error information to an XML-formatted log file.
-a <filename> Adds an attachment to the email. Any number of -a options can be included to add multiple attachments.
-zip <zip-filename> Takes all the added attachments and transforms them into a single zip attachment having the filename specified.
-sign Sends a digitally signed email. The digital certificate is automatically located by searching the certificate stores used by Internet Explorer and Outlook for a certificate that matches the sender's (From) email address. (The -scert option can be used to explicitly use a certificate from a file.)
-encrypt Sends an encrypted email. The digital certificate is automatically located by searching the certificate stores used by Internet Explorer and Outlook for a certificate that matches the recipient's (To) email address. (The -ecert option can be used to explicitly use a certificate from a file.)
-scert <cert-file> Explicitly specify a digital certificate file (.cer, .p7m, .p7s) to be used for signing.
-ecert <cert-file> Explicitly specify a digital certificate file (.cer, .p7m, .p7s) to be used for encryption.
-fbody <text-file> Sets the plain-text email body from a text file.
-icharset <charset> The input charset. Indicates the character encoding of input data such as the subject and body, such as "utf-8", "iso-8859-1", "shift_jis", etc.
-scharset <charset> The sending charset. Indicates the character encoding to be used for sending the email, such as "utf-8", "iso-8859-1", "shift_jis", etc. The input charset and the sending charset can be different, and this causes the email to automatically be converted and encoded properly wherever necessary.
-replyto <email-address> The reply-to address which can be different from the "From" address.
-fto <filename> Reads "To" addresses from a file (one email address per line). Each line can be formatted as a plain email address such as "support@chilkatsoft.com", or an email address with friendly name, such as "Chilkat Support <support@chilkatsoft.com>"
-fcc <filename> Reads "CC" addresses from a file (one email address per line). Each line can be formatted as a plain email address such as "support@chilkatsoft.com", or an email address with friendly name, such as "Chilkat Support <support@chilkatsoft.com>"
-fbcc <filename> Reads "BCC" addresses from a file (one email address per line). Each line can be formatted as a plain email address such as "support@chilkatsoft.com", or an email address with friendly name, such as "Chilkat Support <support@chilkatsoft.com>"

Example

% MailCommand -unlock MyUnlockCode -smtp smtp.earthlink.net -sub "This is the subject" -body "This is the body" -from "Chilkat Support <support@chilkatsoft.com>" -to "Chilkat Sales <sales@chilkatsoft.com>, John Doe <john.doe@chilkatsoft.com>" -log "sendMailLog.xml"

Output

The MailCommand program will write "Mail Sent" to standard output when the email is successfully sent. If an error occurs, a string beginning with "ERROR:" is written to standard output.


Privacy Statement. Copyright 2000-2022 Chilkat Software, Inc. All rights reserved.

(Regarding the usage of the Android logo) Portions of this page are reproduced from work created and shared by Google and used according to terms
described in the Creative Commons 3.0 Attribution License.

Send feedback to info@chilkatsoft.com

Software APIs, modules, components, and libraries for Windows, Linux, MacOS, iOS, Android™, Solaris, MinGW, ...