Description of MAILIT
Download count: 27 this month, 5529 altogether.
Downloads for MAILIT:
VMARC archive: v-280K
From Kris Buelens, IBM Belgium
MAILIT is a general purpose e-mail sender program, designed to be called by REXX execs.
MAILIT was originally created for an application that can send
logfile-like messages to people defined in names files.
MAILIT is not written to only address SMTP needs in VM; it knows
VM users, RSCS (NJE) users, and SMTP addresses.
So, it was never meant to be called directly by end-users:
- Most end-user find the specification of the parameters not intuitive. For end-user usage of MAILIT you probably want to make a front-end EXEC. But, MAILIT can now also be called to send notes composed with the CMS NOTE command. NOTE users can even send HTML formatted notes to SMTP users.
- MAILIT has many options. Some may seem silly or useless (such as a possibility to sort the mail being sent). However they are very useful for some mail generating applications.
What has MAILIT as opposed to SENDFILE and/or NOTE
MAILIT can send e-Mail in the VM spool, the RSCS network, the SMTP world (Internet), as well to MEMO (Verimation) if you have the CMS/MEMO bridge.
"Blind copy" is possible.
The mail to send can be a CMS file, a REXX stem, a string, ... Examples:
MAILIT TO myFriend TITLE Hello TEXT Hi there ... MAILIT FILE(PROFILE EXEC) TO myFriend TITLE(My PROFILE) ... PREFACE(Here my PROFILE EXEC, please handle)
The mail body can be manipulated during the send process. For example you can sort or filter records from a logfile. The mail to send is not first stored on a CMS disk, we directly write to the VM spool. So it can be used even when the A-disk is R/O.
MAILIT supports many more SMTP options than NOTE and SENDFILE, for example the specification of FROM users, or the possiblity to send a note with many attachments, or inline attachments (an "inline attachment" is an object that the mail client is supposed to display directly, alongside the mail's body text)
When the destination is a VM user (in the RSCS network), there are some other features missing in NOTE:
- The mail can be delivered as a NOTE or a FILE (the difference is seen by RECEIVE: NOTEs are appended to a NOTEBOOK, FILEs are stored in a disk file).
- You can define the spool filename and filetype.
When using NOTE, all files look the same in RDRLIST and the sender's userid appears even twice:
Filename Filetype Class User at Node sender NOTE PUN A sender VMxyzWith MAILIT the sender can store precious information in the fn/ft. In my RDRLIST for example, records like these can be found:
Filename Filetype Class User at Node CMS18 distTODO PUN A VMUTIL VMKBBR01 REXX370 distTODO PUN A VMUTIL VMKBBR01 CPDUMP IVQ004 PUN A VMUTIL VMKBME03So, without PEEKing the file, I can guess what the e-mail is about.
Version 3.4.c 1 November 2013
An error against the SMTP RFC was signalled to me (there was a blank following MAIL FROM: and RCPT TO:). Even though this doesn't seem to cause problems, I fixed it.
It is good practice to sign mails sent by service machines by including the name of the exec that signals a problem. A simple example:
parse upper source . . myname mytype . syn . parse value diag(8,'QUERY USERID') with runner '15'x 'EXEC MAILIT ..... TEXT blabla to send', || '1515'x || 'Mail generated by' myname 'running in' runnerDon suggested to include similar information in the SMTP header as to make caller information will always available. It will not be visible when opening the mail; the end-user will need to display the headers to have it revealed.
Version 3.4.b 8 December 2008
The INMR03 record built by MAILIT wasn't correct: it must describe the spool file format, but MAILIT used the characteristics of the mail being sent. VM's NETDATA command doesn't care about INMR03, so no problem for mails sent to SMTP or CMS users, but potential problems for mails sent to TSO users.
Version 3.4.a 16 January 2008
Fix a bug (introduced in V3.0): when lines were stacked when MAILIT was started, the first stacked line was used instead of IDENTIFY's response, leading to various unpredictable results such as:MAILIT: Sending NOTE to SMTP at failed: Problem Closing spool Punch file, CP: HCPCSL053E NAME not in CP directoryOne improvement: CSL routine DMSINXED is used to check if called from inside NOTE.
Version 3.4 13 August 2007
One change only: RFC 822 requires an extra closing boundary delimiter at the end of a multipart message. MAILIT didn't create that, what was disliked for example by VM's IMAP server.
Version 3.3 07/07/07
- The major change is RPATH, what makes it possible to send delivery error and information messages to other addresses than the mail sender. Refer to MAILIT CHANGES for details.
"MAILIT SETUP" entered in a XEDIT of "userid NOTE" caused the note to be sent directly. Worse: any operand MAILIT XEDIT did not recognize resulted in the note being sent.
Version 3.2.1 Nov 2006We fixed a NOVALUE error for variable IPHOST when using ACK in notes sent to SMTP users where no ReplyTo address is defined.
Version 3.2 Oct 2006Here the changes, most make MAILIT comply better to the SMTP rules.
- The delimiter inserted between attachments is now a unique string. This way, one can send the intercepted output of MAILIT as an attachment in another MAILIT mail.
- Don't include an empty multipart section if no text in body
- When no "userid NETLOG A" exists, a REXX trace of a Pipeline was displayed when MAILIT was called with the LOG option.
- New sub options for ATTACH:
- to define an attachment description
- tells to use as default the MIME options of another filetype than the filetype of the attachment.
- to explicitely turn off BINARY or BAS64 when DISTRIB NAMES would turn this on for the filetype of the attachment.
- This new sub-option for ATTACH allows you to provide extra headers for the attachments (or to provide your own headers).
- Incompatible: The default for the RFC822 option is now MERGE iso AFTER. This way, the RFC822 option and RFC822 ATTACH sub-option have the same default.
- MIME headers longer than 70 characters are now splitted over multiple lines.
- The fileid of an attached file is no longer enclosed in double quotes when it doesn't contain special characters.
Version 3.1 Nov 2005Only a few changes:
- Can use spaces in the workstation fileid for attachments: enclose it in double quotes. To use double quotes in the fileid double them (like in REXX). Using a )-character in the fileid remains impossible.
- The RFC822 sub-option of ATTACH was ignored. That is you could not override/extend the RFC822 headers with by your own information.
- MI ATTACH in CMS NOTE: you can now select the file to attach from a selection list. Include an * or % sign in the fn/ft
Version 3.0 Aug 2005
MAILIT has been made more complient with the SMTP rules (RFC2822).
As a consequence, some incompatibilities where required, and this is why MAILIT is now called Version 3. The incompatibilities:
- In the list of addresses, you can pass a name for the addressee. In
earlier versions the name could be entered between single or double
quotes. But, this had to be changed: SMTP requires double quotes
("). A single quote is not even even a special character for SMTP;
an address like the one below is perfectly valid.
*----------------------------------------------------------------* | ==> MAILIT no longer accepts names between single quotes | | Now invalid: TO('Kris Buelens' Kris_buelens@be.ibm.com) | | Use this: TO("Kris Buelens" Kris_buelens@be.ibm.com) | *----------------------------------------------------------------*
- In earlier versions, MAILIT splitted the addressees in sections: NJE addresses first, then SMTP addresses With the support of "distribution lists" this oddity has been removed the addressees will appear in the e-mail in the order you entered them.
- In Version 2, attachments always resulted in a multipart mail, even
if the attachment was the only thing to send (i.e. the mail body,
defined with TEXT/STEM/FILE/XEDIT, was empty). Some mail clients did
not like that and ignored the "Content-Disposition: inline" request.
MAILIT now no longer sends such a mail in multi-part format.
*----------------------------------------------------------------* | ==> The redesign caused that some empty multi-part sections | | are no longer created. As a result, if you compose complex| | mails (e.g. with inline images and/or HTML sections) some | | sections that previously were presented on a new line now | | simply follow the preceeding piece. . You can use the | | NL (NewLine) attach option to insert some white space. | *----------------------------------------------------------------*
- Multiple "Reply-To" users is now possible.
- Specification of a "From" address list. In the SMTP world, the "From" address can be different from the sender's address.
- Support for distribution lists in From, To, Reply-To
- Ack user(s) can be a nickname too
- NONAME sub-option on ATTACH
- Attachments can not only be a file or hardcoded text, but also a REXX variable or stem.
- Disk resident attachments are no longer first stored in REXX variables before being sent into the spool (what can cause storage full problems for large attachments). Now we directly read from disk and pipe to the spool. As a result, the size info (lrecl & bytes sent) that is included in the NETDATA headers are approximations. VM's SMTP server can live with that.
- Fewer REXX compiler warnings: all TRACE -1 instructions have been removed; missing -but impossible- Otherwise clauses have been added. Only 1 warning remains for the TRACE E used in the exec.
- When problems happened in the final pipe to punch the mail in the spool, MAILIT's exit returncode could remain 0.
- The sender's domain-name is now the one defined in TCPIP DATA (if found) instead of the nodeid returned by IDENTIFY.
- Sometimes the postbox and address were not enclosed between < and >
- ACK didn't work for NJE destinations
- The :userid. tags for addresses found in NAMES file are no longer uppercased for SMTP addressees.
- A "Reply-To: user" written inside the note (it must follow the To:, cc:, and bcc: users) was blanked out again, hence ignored.
- Unrecognized keywords between To: and Subject: were silently ignored and not sent to the destination.
- When you change the userid on the From: card (which is set to your VM userid by the NOTE command), MAILIT honors this new userid and will use this as "From" user when the note is sent to SMTP addresses.
Version 2.2 Jun 2005Add source of RXMB for installations without Rexx Compiler lib.
Be sure leading . get translated to .. in attachments too.
Version 2.1b Jun 2005When called from NOTE, date line had double "Date:" keyword, like:
Date: Date: 9 June 2005, 10:37:28 +0200
Change some MEMO related text to avoid confusion for readers that never heard about Verimation's e-mail product called MEMO.
Version 2.1a May 2005Avoid a REXX trace line to console for "MAILIT XEDIT ....".
Version 2.1 May 2005MAILIT can be called from NOTE, you can interactively compose a with attachments and/or imbedded images, HTML files etc. A CMS NOTE Sent with MAILIT can also use blind-copy addressees. EXECs calling MAILIT can now also pass names of addressees. More information: cfr MAILIT CHAN?GES
Version 1.4 March 2005Improve SMTP: Uppercase FMode of attached files;
Create a unique Message-ID; Support ACK; real blindcopy support ("BCC:"). An RFC822 option allows you insert additional RFC822 headers.
Version 1.3 December 2004adds support for attachments (a feature used often in the SMTP world). Be sure to review the MIME definitions in DISTRIB SAMPNAMS and to copy what you need in your own DISTRIB NAMES. MAILIT HELPCMS contains some extra information.
Version 1.2provides mail rerouting support & default ReplyTo for selected senders.
Fix SMTP destinations when FILTERTAG is being used.
Improved HELPCMS file.
Version 1.1adds SMTP support; that is, MAILIT can also send mails into the Internet world.