MH & nmh: Email for Users & Programmers

May, 2006

Explanation of original

The Section Recovering MIME Drafts gives an overview of this script. Here is the original script (you might want to open it in a separate browser window). To install it, see the Section Programs in This Book's Archive.

The original script is straightforward. It finds the mhdraft environment variable (shown in the Table Environment Variables that MH Sets), set by the whatnow program. The script uses a Bourne shell ${variable?error} parameter-substitution test to print a two-line error message if mhdraft isn't set. Otherwise, the value of mhdraft is parsed to find the directory and filename that hold the draft message. The filename will be different if your account uses a draft folder; the script handles single drafts and draft folders.