Tcl Mail Extension for Windows RCS Version $Revision: 1.2 $ RCS Last Change Date: $Date: 2001/12/23 22:43:20 $ Version 1.0.1.5 Original Author: Michael I. Schwartz, mschwart@nyx.net MSC merged code contribution: Chris Nelson, nelson@pinebush.com Read, Delete, Logon, Logoff code contribution: Mark Austin, maustin@anadigics.com {LICENSE} THIS SOFTWARE IS PROVIDED BY THE AUTHOR WITH PERMISSION TO USE, COPY, MODIFY, AND DISTRIBUTE IT FOR ANY PURPOSE WITH THE FOLLOWING CONDITIONS: 1) IN SOURCE FORM, THIS HEADER MUST BE PRESERVED AND THESE CONDITIONS PROPOGATED 2) IN BINARY FORM, THE ORIGINAL AUTHOR MUST BE ACKNOWLEDGED IN DOCUMENTATION AND CREDITS SCREEN (IF ANY) 3) FOR ANY COMMERCIAL SALE, THE AUTHOR MUST BE NOTIFIED OF THE USE OF THIS CODE IN A PARTICULAR PRODUCT; THE ORIGINAL AUTHOR MAY CITE THE COMMERCIAL SELLER AS A BENEFICIARY OF THE CODE. IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. {SYNOPSIS} This file contains commands to extend TK for Windows 3.11, Windows 95, and Windows NT 4.0 features The commands are: mapimail {MAIL} mapimail send [-to tolist] [-subject subject] \ [-body text] [-attachments attachmentlist] DESCRIPTION: Uses cmc_send_documents() or MAPISendMail() to send mail. OPTIONS: -to tolist is a tcl list consisting of mail addresses Each address must be acceptable to your mailer; aliases are supported. If the name starts with cc:, the remainder is placed as a carbon-copy recipient. If the name starts with bcc:, the remainder is placed as a blind carbon-copy recipient (assuming bcc is supported by your mailer). If no -to argument is given, the mail program's dialog is invoked. -subject Goes into the subject of the message If no -subject is provided, the subject is "No Subject" -body The text supplied here goes into the body of the message If no -body is provided, there is no message body -attachments attachmentlist is a tcl list of filenames to be attached to the message. If no -attachments is provided, there are no attachments. tolist and attachmentlist are tcl lists. -debug This is a TEMPORARY option. Using this, the mail program will ALWAYS bring up its dialog. LIMITATIONS: Under Win32s (Win3.11) MSMail does not appear to support MAPI32. Eudora does, but the mail program must be loaded or a MAPI32.DLL NOT FOUND dialog will be displayed. If you run multiple mailers, your installation options determine which mailer is invoked by this mail program. mapimail address [-clear] DESCRIPTION: Uses MAPIAddress or cmc_address_list to get a list of recipients formatted for use in the mail send command. OPTIONS: -clear clears the current recipient list before proceeding LIMITATIONS: Works only under Win95 and WinNT mapimail enabled [-detail] DESCRIPTION: returns 1 if MAPI is enabled in the Windows registry, 0 otherwise OPTIONS: -detail Provides the version info in MAPI32.DLL if found mapimail logon [-user username] [-password passwd] [-ui true|false] DESCRIPTION: Logs onto a (new) mail session If no options are provided, tries to logon with the "null" profile. OPTIONS: -user Specifies the username or profile name for logon -password If specifying a user, the password for the user is provided. With a legal user and password, the UI will not need to come up. -ui If true (default), the UI will come up if needed. LIMITATIONS: mapimail logoff DESCRIPTION: Logs out of any mail session started with mail logon. LIMITATIONS: mapimail option [-mailer cmc|mapi] [-verbose n] DESCRIPTION: Sets any available extension-level options. OPTIONS: -mailer Determines whether CMC or MAPI mail protocols are used. CMC is simpler, but more MS mailers support MAPI. For instance, earlier versions of Eudora support MAPI only. The default, therefore, is mapi. -verbose Specifies the level of messages to return from the mail extension. The default, 0, has the minimum messages. LIMITATIONS: Only delete currently reports extra information if verbose. mapimail read [-digest] [-peek] [-attachments true|false] [-bodyfile true|false] [-reset] -new|-all DESCRIPTION: Gets the contents of the "next" message in the mailbox. OPTIONS: -new (not default) If specified, only looks at new messages -all (not default) If specified, looks at all messages, beginning with the first message -reset (not default) If specified, restarts message counter. -digest (not default) Gets the "envelope" information without getting the body of the message -peek (not default) Gets the next message without marking it as read -attachments (true) Specifies whether to retrieve the attachments or not. -bodyfile (false) Specifies whether the textual body of the message should be treated as a file (or as a string) LIMITATIONS: Supported interfaces don't match between CMC and MAPI, so some differences in the return values exist. For instance MAPI returns the time received, while CMC returns the time sent. Only supports "inbox" without using extensions. mapimail delete messageid ... Removes the named messages from the mailbox. OPTIONS: LIMITATIONS: mapimail version DESCRIPTION: Returns the version of the mail command LIMITATIONS: None.