Previous: , Up: Profile Components and Customized Files   [Contents][Index]


10.4.2 Components Files

Components files are templates for outgoing mail header fields that specify position and sometimes values for specified fields. Example files are shown for each one discussed here. These should exist in the user’s mail directory.

For originating mail there is a components file named "components", and it is used by the MH utility comp. An example follows:

   To: 
   cc: 
   fcc: out-copy
   Subject: 
   --------

This example file differs from the default by including the fcc: line. This causes MH to keep a copy of the outgoing draft message. Also, though it isn’t visible here, the To:, cc:, and Subject: lines have a space at the end.

The "forwcomps" components file is a template for the header fields of any forwarded message. Though it may be different, our example is the same as the previous one. These are distinct files for MH’s purposes, and it is more flexible since the user might not want to keep copies of forwarded messages.

The "replcomps" components file is a template for the header fields of any draft message composed when replying to a message. An example follows:

   %(lit)%(formataddr %<{reply-to}%|%<{from}%|%{sender}%>%>)\
   %<(nonnull)%(void(width))%(putaddr To: )\n%>\
   %(lit)%(formataddr{to})%(formataddr{cc})%(formataddr(me))\
   %(formataddr{resent-to})\
   %<(nonnull)%(void(width))%(putaddr cc: )\n%>\
   %<{fcc}Fcc: %{fcc}\n%>\
   %<{subject}Subject: Re: %{subject}\n%>\
   %<{date}In-reply-to: Your message of \
   %<(nodate{date})%{date}%|%(tws{date})%>.%<{message-id}
		%{message-id}%>\n%>\
   --------

This example file differs from the default by including the resent-to: field (in addition to the to: and cc: fields) of the message being replied to in the cc: field of the draft. This is necessary for replying to all recipients of a distributed message. Keeping a copy of the outgoing draft message works a little differently with reply components. MH expects a switch which the user can put in his profile (see section Profile of this chapter), and using the MH formatting language, this file tests for the fcc value as does the standard file.


Previous: Profile Components, Up: Profile Components and Customized Files   [Contents][Index]