MHonArc

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

doc/resources/lock.html
doc/resources/lockdelay.html
doc/resources/lockfile.html
doc/resources/lockmethod.html
doc/resources/locktries.html
doc/resources/mailto.html
doc/resources/mailtourl.html
doc/resources/main.html
doc/resources/maxsize.html
doc/resources/mhpattern.html
doc/resources/mimealtprefs.html
doc/resources/mimeargs.html
doc/resources/mimedecoders.html
doc/resources/mimeexcs.html
doc/resources/mimefilters.html
doc/resources/mimeincs.html
doc/resources/modifybodyaddresses.html
doc/resources/modtime.html
doc/resources/months.html
doc/resources/monthsabr.html
doc/resources/msgbodyend.html

doc/app-mimeconf.html  view on Meta::CPAN

</tr>
</table>
    <li><p>Recognize the "alternative" subtype, and avoid
    showing the user redundant parts of
    multipart/alternative mail.
</p>
<table border=0 cellpadding=4>
<tr valign=top>
<td><strong><img src="monicon.png" alt="MHonArc"></strong></td>
<td><p>Yes.  MHonArc also provides the
<a href="resources/mimealtprefs.html">MIMEALTPREFS</a> resource to
allow users to control media-type preferences for
<tt>multipart/alternative</tt> mail.
</p>
</td>
</tr>
</table>
    <li><p>Recognize the "multipart/digest" subtype,
    specifically using "message/rfc822" rather than
    "text/plain" as the default media type for body parts
    inside "multipart/digest" entities.

doc/app-mimeconf.html  view on Meta::CPAN

information, see the
<a href="resources/mimefilters.html">MIMEFILTERS</a> resource.
Note, many media-types cannot be directly converted into HTML.  For
these types, they are saved to a separate file with a link to the
file inserted in the converted HTML message data.
</p>
</li>

<li><p>The ability to explicitly control media-type preferences
of <tt>multipart/alternative</tt> data via the
<a href="resources/mimealtprefs.html">MIMEALTPREFS</a> resource
</p>
</li>

<li><p>Support for <b><tt>multipart/related</tt></b> by allowing
<a href="resources/mimefilters.html">filters</a> to access other
message parts via content-ids.
</p>
</li>

<li><p>Support for <b><tt>cid:</tt></b> URLs in <b><tt>text/html</tt></b>

doc/app-rcidx.html  view on Meta::CPAN

<tr valign="top"><td align="right"><b><a href="resources/listbegin.html"><tt>&lt;LISTBEGIN&gt;</tt></a></b></td><td></td><td>Markup to begin main index message listing.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/listend.html"><tt>&lt;LISTEND&gt;</tt></a></b></td><td></td><td>Markup to end main index message listing.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/litemplate.html"><tt>&lt;LITEMPLATE&gt;</tt></a></b></td><td></td><td>Markup for an entry in the main index message list.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/localdatefmt.html"><tt>&lt;LOCALDATEFMT&gt;</tt></a></b></td><td></td><td>Conversion specification for printing local date.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/lockmethod.html"><tt>&lt;LOCKMETHOD&gt;</tt></a></b></td><td></td><td>How archive locks are done.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/mailto.html"><tt>&lt;MAILTO&gt;</tt><br><tt>&lt;NOMAILTO&gt;</tt></a></b></td><td></td><td>Convert email addresses in message headers to hyperlinks.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/mailtourl.html"><tt>&lt;MAILTOURL&gt;</tt></a></b></td><td></td><td>URL template to use when MAILTO is set.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/main.html"><tt>&lt;MAIN&gt;</tt><br><tt>&lt;NOMAIN&gt;</tt></a></b></td><td></td><td>Create main index.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/maxsize.html"><tt>&lt;MAXSIZE&gt;</tt></a></b></td><td></td><td>Maximum number of messages in an archive.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/mhpattern.html"><tt>&lt;MHPATTERN&gt;</tt></a></b></td><td></td><td>Regex for matching message files in an MH folder (directory).</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/mimealtprefs.html"><tt>&lt;MIMEALTPREFS&gt;</tt></a></b></td><td></td><td>Content-type preferences for multipart/alternative data.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/mimeargs.html"><tt>&lt;MIMEARGS&gt;</tt></a></b></td><td></td><td>Arguments to MIME filters.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/mimedecoders.html"><tt>&lt;MIMEDECODERS&gt;</tt></a></b></td><td></td><td>Content-Transfer-Encoding decoding functions.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/mimeexcs.html"><tt>&lt;MIMEEXCS&gt;</tt></a></b></td><td></td><td>Content-types to exclude.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/mimefilters.html"><tt>&lt;MIMEFILTERS&gt;</tt></a></b></td><td></td><td>Mapping of MIME filters to content-types.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/mimeincs.html"><tt>&lt;MIMEINCS&gt;</tt></a></b></td><td></td><td>Content-types to allow.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/modifybodyaddresses.html"><tt>&lt;MODIFYBODYADDRESSES&gt;</tt><br><tt>&lt;NOMODIFYBODYADDRESSES&gt;</tt></a></b></td><td></td><td>Apply ADDRESSMODIFYCODE to text message bodies.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/modtime.html"><tt>&lt;MODTIME&gt;</tt></a></b></td><td></td><td>Set modification time on message files to message dates.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/months.html"><tt>&lt;MONTHS&gt;</tt></a></b></td><td></td><td>Month names.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/monthsabr.html"><tt>&lt;MONTHSABR&gt;</tt></a></b></td><td></td><td>Abbreviated month names.</td></tr>
<tr valign="top"><td align="right"><b><a href="resources/msgbodyend.html"><tt>&lt;MSGBODYEND&gt;</tt></a></b></td><td></td><td>Markup after the message body.</td></tr>

doc/faq/mime.html  view on Meta::CPAN

<b>&lt;/MIMEExcs&gt;</b>
</pre>

<!-- ??????????????????????????????????????????????????????????????? -->
<hr noshade size=1>
<table border=0>
<tr valign=baseline><td><img src="monicon.png" align="bottom" alt=""></td><td>
<h3><b><a name="alternative">Can I tell MHonArc to use the text/plain part over a text/html part in a multipart/alternative message?</a></b></h3>
</td></tr></table>

<p>Yes, in v2.5.8, and later, via the <a href="../resources/mimealtprefs.html">MIMEALTPREFS</a> resource.
Example:
</p>
<pre class="code">
<b>&lt;MIMEAltPrefs&gt;</b>
text/plain
text/html
<b>&lt;/MIMEAltPrefs&gt;</b>
</pre>

<!-- ??????????????????????????????????????????????????????????????? -->

doc/faq/security.html  view on Meta::CPAN

want to show the data, but have it so the HTML markup is completely
neutralized.  The following resource settings will neutralize the
dangers of HTML messages without excluding message data:
</p>

<pre class="code">
&lt;!-- It is common for popular MUA's to provide a text/plain version
     of the text/html version of a message body.  Therefore, we
     use MIMEALTPREFS to choose the text/plain version if available.
  --&gt;
<b><a href="../resources/mimealtprefs.html">&lt;MimeAltPrefs&gt;</a></b>
text/plain
text/html
<b>&lt;/MimeAltPrefs&gt;</b>

&lt;!-- For messages that do not have a text/plain alternative, we
     treat HTML data as text/plain so the content is not lost, but
     HTML markup is escaped and neutralized.
  --&gt;
<b><a href="../resources/mimefilters.html">&lt;MIMEFilters&gt;</a></b>
text/html;   m2h_text_plain::filter; mhtxtplain.pl

doc/rcfileexs/def-mime.mrc.html  view on Meta::CPAN

&lt;!-- MIMEARGS defines arguments to pass to filters registered via
     MIMEFILTERS.
  --&gt;
<b><a href="../resources/mimeargs.html">&lt;MIMEArgs&gt;</a></b>
m2h_external::filter; inline
<b>&lt;/MIMEArgs&gt;</b>

&lt;!-- MIMEALTPREFS defines content-type preferences for
     multipart/alternative messages.
  --&gt;
<b><a href="../resources/mimealtprefs.html">&lt;MIMEAltPrefs&gt;</a></b>
<b>&lt;/MIMEAltPrefs&gt;</b>

&lt;!-- MIMEDECODERS defines functions that decode data according
     to an entitie's Content-Transfer-Encoding.
  --&gt;
<b><a href="../resources/mimedecoders.html">&lt;MIMEDecoders&gt;</a></b>
7bit;   	  as-is;
8bit;   	  as-is;
binary;   	  as-is;
base64;   	  base64::b64decode;		base64.pl

doc/rcfileexs/secure.mrc.html  view on Meta::CPAN

      it is perfect.

      SIMPLE RULE: If the archive receives messages from untrusted
      sources, HTML data SHOULD be neutralized.
  --&gt;

&lt;!-- Many HTML message have an alternative text/plain part,
     therefore, for such messages, lets give preference to
     text/plain part.
  --&gt;
<b><a href="../resources/mimealtprefs.html">&lt;MIMEAltPrefs&gt;</a></b>
text/plain
text/html
<b>&lt;/MIMEAltPrefs&gt;</b>

&lt;!-- If there is no text/plain part, we treat text/html as plain
     text.  This way, something will show up, but it may not be
     that pretty depending on how the raw HTML data is formatted.
  --&gt;
<b><a href="../resources/mimefilters.html">&lt;MIMEFilters&gt;</a></b>
text/html;   m2h_text_plain::filter; mhtxtplain.pl

doc/resources.html  view on Meta::CPAN

<tr valign="top"><td align="right"><b><a name="lock" href="resources/lock.html">LOCK</a></b></td><td></td><td>Perform a lock on the archive.</td></tr>
<tr valign="top"><td align="right"><b><a name="lockdelay" href="resources/lockdelay.html">LOCKDELAY</a></b></td><td></td><td>Wait time between lock attempts.</td></tr>
<tr valign="top"><td align="right"><b><a name="lockfile" href="resources/lockfile.html">LOCKFILE</a></b></td><td></td><td>Name of the lock file.</td></tr>
<tr valign="top"><td align="right"><b><a name="lockmethod" href="resources/lockmethod.html">LOCKMETHOD</a></b></td><td></td><td>How archive locks are done.</td></tr>
<tr valign="top"><td align="right"><b><a name="locktries" href="resources/locktries.html">LOCKTRIES</a></b></td><td></td><td>Total number of time to attempt a lock before failing.</td></tr>
<tr valign="top"><td align="right"><b><a name="mailto" href="resources/mailto.html">MAILTO</a></b></td><td></td><td>Convert email addresses in message headers to hyperlinks.</td></tr>
<tr valign="top"><td align="right"><b><a name="mailtourl" href="resources/mailtourl.html">MAILTOURL</a></b></td><td></td><td>URL template to use when MAILTO is set.</td></tr>
<tr valign="top"><td align="right"><b><a name="main" href="resources/main.html">MAIN</a></b></td><td></td><td>Create main index.</td></tr>
<tr valign="top"><td align="right"><b><a name="maxsize" href="resources/maxsize.html">MAXSIZE</a></b></td><td></td><td>Maximum number of messages in an archive.</td></tr>
<tr valign="top"><td align="right"><b><a name="mhpattern" href="resources/mhpattern.html">MHPATTERN</a></b></td><td></td><td>Regex for matching message files in an MH folder (directory).</td></tr>
<tr valign="top"><td align="right"><b><a name="mimealtprefs" href="resources/mimealtprefs.html">MIMEALTPREFS</a></b></td><td></td><td>Content-type preferences for multipart/alternative data.</td></tr>
<tr valign="top"><td align="right"><b><a name="mimeargs" href="resources/mimeargs.html">MIMEARGS</a></b></td><td></td><td>Arguments to MIME filters.</td></tr>
<tr valign="top"><td align="right"><b><a name="mimedecoders" href="resources/mimedecoders.html">MIMEDECODERS</a></b></td><td></td><td>Content-Transfer-Encoding decoding functions.</td></tr>
<tr valign="top"><td align="right"><b><a name="mimeexcs" href="resources/mimeexcs.html">MIMEEXCS</a></b></td><td></td><td>Content-types to exclude.</td></tr>
<tr valign="top"><td align="right"><b><a name="mimefilters" href="resources/mimefilters.html">MIMEFILTERS</a></b></td><td></td><td>Mapping of MIME filters to content-types.</td></tr>
<tr valign="top"><td align="right"><b><a name="mimeincs" href="resources/mimeincs.html">MIMEINCS</a></b></td><td></td><td>Content-types to allow.</td></tr>
<tr valign="top"><td align="right"><b><a name="modifybodyaddresses" href="resources/modifybodyaddresses.html">MODIFYBODYADDRESSES</a></b></td><td></td><td>Apply ADDRESSMODIFYCODE to text message bodies.</td></tr>
<tr valign="top"><td align="right"><b><a name="modtime" href="resources/modtime.html">MODTIME</a></b></td><td></td><td>Set modification time on message files to message dates.</td></tr>
<tr valign="top"><td align="right"><b><a name="months" href="resources/months.html">MONTHS</a></b></td><td></td><td>Month names.</td></tr>
<tr valign="top"><td align="right"><b><a name="monthsabr" href="resources/monthsabr.html">MONTHSABR</a></b></td><td></td><td>Abbreviated month names.</td></tr>
<tr valign="top"><td align="right"><b><a name="msgbodyend" href="resources/msgbodyend.html">MSGBODYEND</a></b></td><td></td><td>Markup after the message body.</td></tr>

doc/resources/mhpattern.html  view on Meta::CPAN

<html>
<head>
<title>MHonArc Resources: MHPATTERN</title>
<link rel="stylesheet" type="text/css" href="../docstyles.css">
</head>
<body>
<!--x-rc-nav-->
<table border=0><tr valign="top">
<td align="left" width="50%">[Prev:&nbsp;<a href="maxsize.html">MAXSIZE</a>]</td><td><nobr>[<a href="../resources.html#mhpattern">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="mimealtp...
<!--/x-rc-nav-->
<hr>
<h1>MHPATTERN</h1>
<!--X-TOC-Start-->
<ul>
<li><a href="#syntax">Syntax</a>
<li><a href="#description">Description</a>
<li><a href="#default">Default Setting</a>
<li><a href="#rcvars">Resource Variables</a>
<li><a href="#examples">Examples</a>

doc/resources/mhpattern.html  view on Meta::CPAN

<hr>
<h2><a name="seealso">See Also</a></h2>

<p>
</p>

<!-- *************************************************************** -->
<hr>
<!--x-rc-nav-->
<table border=0><tr valign="top">
<td align="left" width="50%">[Prev:&nbsp;<a href="maxsize.html">MAXSIZE</a>]</td><td><nobr>[<a href="../resources.html#mhpattern">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="mimealtp...
<!--/x-rc-nav-->
<hr>
<address>
$Date: 2003/10/06 22:04:18 $ <br>
<img align="top" src="../monicon.png" alt="">
<a href="http://www.mhonarc.org/"><strong>MHonArc</strong></a><br>
Copyright &#169; 1997-1998, <a href="http://www.earlhood.com/">Earl Hood</a>, <a href="mailto:mhonarc&#37;40mhonarc.org">mhonarc<!--
-->&#64;<!--
-->mhonarc.org</a><br>
</address>

doc/resources/mimealtprefs.html  view on Meta::CPAN

<html>
<head>
<title>MHonArc Resources: MIMEALTPREFS</title>
<link rel="stylesheet" type="text/css" href="../docstyles.css">
</head>
<body>
<!--x-rc-nav-->
<table border=0><tr valign="top">
<td align="left" width="50%">[Prev:&nbsp;<a href="mhpattern.html">MHPATTERN</a>]</td><td><nobr>[<a href="../resources.html#mimealtprefs">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="m...
<!--/x-rc-nav-->
<hr>
<h1>MIMEALTPREFS</h1>
<!--X-TOC-Start-->
<ul>
<li><a href="#syntax">Syntax</a>
<li><a href="#description">Description</a>
<li><a href="#default">Default Setting</a>
<li><a href="#rcvars">Resource Variables</a>
<li><a href="#examples">Examples</a>

doc/resources/mimealtprefs.html  view on Meta::CPAN

<p>
<a href="mimeexcs.html">MIMEEXCS</a>,
<a href="mimefilters.html">MIMEFILTERS</a>,
<a href="mimeincs.html">MIMEINCS</a>
</p>

<!-- *************************************************************** -->
<hr>
<!--x-rc-nav-->
<table border=0><tr valign="top">
<td align="left" width="50%">[Prev:&nbsp;<a href="mhpattern.html">MHPATTERN</a>]</td><td><nobr>[<a href="../resources.html#mimealtprefs">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="m...
<!--/x-rc-nav-->
<hr>
<address>
$Date: 2005/06/07 19:15:44 $<br>
<img align="top" src="../monicon.png" alt="">
<a href="http://www.mhonarc.org/"><strong>MHonArc</strong></a><br>
Copyright &#169; 2002,2005 <a href="http://www.earlhood.com/"
>Earl Hood</a>, <a href="mailto:mhonarc&#37;40mhonarc.org"
>mhonarc<!--
-->&#64;<!--

doc/resources/mimeargs.html  view on Meta::CPAN

<html>
<head>
<title>MHonArc Resources: MIMEARGS</title>
<link rel="stylesheet" type="text/css" href="../docstyles.css">
</head>
<body>
<!--x-rc-nav-->
<table border=0><tr valign="top">
<td align="left" width="50%">[Prev:&nbsp;<a href="mimealtprefs.html">MIMEALTPREFS</a>]</td><td><nobr>[<a href="../resources.html#mimeargs">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href=...
<!--/x-rc-nav-->
<hr>
<h1>MIMEARGS</h1>
<!--X-TOC-Start-->
<ul>
<li><a href="#syntax">Syntax</a>
<li><a href="#description">Description</a>
<li><a href="#default">Default Setting</a>
<li><a href="#rcvars">Resource Variables</a>
<li><a href="#examples">Examples</a>

doc/resources/mimeargs.html  view on Meta::CPAN

<h2><a name="seealso">See Also</a></h2>

<p>
<a href="mimefilters.html">MIMEFILTERS</a>
</p>

<!-- *************************************************************** -->
<hr>
<!--x-rc-nav-->
<table border=0><tr valign="top">
<td align="left" width="50%">[Prev:&nbsp;<a href="mimealtprefs.html">MIMEALTPREFS</a>]</td><td><nobr>[<a href="../resources.html#mimeargs">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href=...
<!--/x-rc-nav-->
<hr>
<address>
$Date: 2005/05/13 18:50:38 $ <br>
<img align="top" src="../monicon.png" alt="">
<a href="http://www.mhonarc.org/"><strong>MHonArc</strong></a><br>
Copyright &#169; 1997-1998, <a href="http://www.earlhood.com/">Earl Hood</a>, <a href="mailto:mhonarc&#37;40mhonarc.org">mhonarc<!--
-->&#64;<!--
-->mhonarc.org</a><br>
</address>

doc/resources/mimeexcs.html  view on Meta::CPAN

<h2><a name="version">Version</a></h2>

<p>2.4.9
</p>

<!-- *************************************************************** -->
<hr>
<h2><a name="seealso">See Also</a></h2>

<p>
<a href="mimealtprefs.html">MIMEALTPREFS</a>,
<a href="mimefilters.html">MIMEFILTERS</a>,
<a href="mimeincs.html">MIMEINCS</a>
</p>

<!-- *************************************************************** -->
<hr>
<!--x-rc-nav-->
<table border=0><tr valign="top">
<td align="left" width="50%">[Prev:&nbsp;<a href="mimedecoders.html">MIMEDECODERS</a>]</td><td><nobr>[<a href="../resources.html#mimeexcs">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href=...
<!--/x-rc-nav-->

doc/resources/mimefilters.html  view on Meta::CPAN


<p>1.0
</p>

<!-- *************************************************************** -->
<hr>
<h2><a name="seealso">See Also</a></h2>

<p>
<a href="charsetconverters.html">CHARSETCONVERTERS</a>,
<a href="mimealtprefs.html">MIMEALTPREFS</a>,
<a href="mimeargs.html">MIMEARGS</a>,
<a href="mimedecoders.html">MIMEDECODERS</a>,
<a href="mimeexcs.html">MIMEEXCS</a>,
<a href="perlinc.html">PERLINC</a>
</p>

<!-- *************************************************************** -->
<hr>
<!--x-rc-nav-->
<table border=0><tr valign="top">

doc/resources/mimeincs.html  view on Meta::CPAN

<h2><a name="version">Version</a></h2>

<p>2.6.12
</p>

<!-- *************************************************************** -->
<hr>
<h2><a name="seealso">See Also</a></h2>

<p>
<a href="mimealtprefs.html">MIMEALTPREFS</a>,
<a href="mimeexcs.html">MIMEEXCS</a>,
<a href="mimefilters.html">MIMEFILTERS</a>
</p>

<!-- *************************************************************** -->
<hr>
<!--x-rc-nav-->
<table border=0><tr valign="top">
<td align="left" width="50%">[Prev:&nbsp;<a href="mimefilters.html">MIMEFILTERS</a>]</td><td><nobr>[<a href="../resources.html#mimeincs">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="m...
<!--/x-rc-nav-->

examples/mhonarc.vim  view on Meta::CPAN

syn keyword mhaTagName contained litemplate
syn keyword mhaTagName contained localdatefmt
syn keyword mhaTagName contained lockmethod
syn keyword mhaTagName contained mailto
syn keyword mhaTagName contained nomailto
syn keyword mhaTagName contained mailtourl
syn keyword mhaTagName contained main
syn keyword mhaTagName contained nomain
syn keyword mhaTagName contained maxsize
syn keyword mhaTagName contained mhpattern
syn keyword mhaTagName contained mimealtprefs
syn keyword mhaTagName contained mimeargs
syn keyword mhaTagName contained mimedecoders
syn keyword mhaTagName contained mimeexcs
syn keyword mhaTagName contained mimefilters
syn keyword mhaTagName contained mimeincs
syn keyword mhaTagName contained modifybodyaddresses
syn keyword mhaTagName contained nomodifybodyaddresses
syn keyword mhaTagName contained modtime
syn keyword mhaTagName contained monthsabr
syn keyword mhaTagName contained months

lib/mhopt.pl  view on Meta::CPAN

        foreach (@{$opt{'perlinc'}}) {
            push(@array, split(/$PATHSEP/o, $_));
        }
        unshift(@PerlINC, @array);
    }

    @OtherIdxs = remove_dups(\@OtherIdxs);
    @PerlINC   = remove_dups(\@PerlINC);
    unshift(@INC, @PerlINC);

    ## Set alternative prefs
    if (!$SCAN) {
        readmail::MAILset_alternative_prefs(@MIMEAltPrefs);
        $IsDefault{'MIMEALTPREFS'} = !scalar(@MIMEAltPrefs);
    }

    ## Get other command-line options
    $DBFILE = $opt{'dbfile'} if $opt{'dbfile'};    # Override db
    $DBPathName =
        OSis_absolute_path($DBFILE)
        ? $DBFILE
        : join($DIRSEP, $OUTDIR, $DBFILE);

lib/mhrcfile.pl  view on Meta::CPAN

                    $MsgPrefix = $line;
                }
                last FMTSW;
            }
            if ($elem eq 'mhpattern') {        # File pattern MH-like dirs
                if ($line = &get_elem_last_line($handle, $elem)) {
                    $MHPATTERN = $line;
                }
                last FMTSW;
            }
            if ($elem eq 'mimealtprefs') {     # Mime alternative prefs
                $IsDefault{'MIMEALTPREFS'} = 0;
                @MIMEAltPrefs = ();
                while (defined($line = <$handle>)) {
                    last if $line =~ /^\s*<\/mimealtprefs\s*>/i;
                    $line =~ s/\s//g;
                    push(@MIMEAltPrefs, lc($line)) if $line;
                }
                last FMTSW;
            }
            if ($elem eq 'mimedecoders') {     # Mime decoders
                $IsDefault{'MIMEDECODERS'} = 0;
                if ($override) {
                    %readmail::MIMEDecoders    = ();
                    %readmail::MIMEDecodersSrc = ();

lib/readmail.pl  view on Meta::CPAN


                ## Else treat body as one part
            } else {
                @parts = ($$body);
            }

            ## Process parts
            my (@entity) = ();
            my ($cid, $href, $pctype);
            my %alt_exc        = ();
            my $have_alt_prefs = $isalt && scalar(@_MIMEAltPrefs);
            my $partno         = 0;
            @parts = \(@parts);
            while (defined($part = shift(@parts))) {
                $href = {};
                $partfields = $href->{'fields'} = (MAILread_header($part))[0];
                $href->{'body'}                    = $part;
                $href->{'filtered'}                = 0;
                $partfields->{'x-mha-part-number'} = ++$partno;
                $pctype =
                    extract_ctype($partfields->{'content-type'}, $ctype);

                ## check alternative preferences
                if ($have_alt_prefs) {
                    next if ($alt_exc{$pctype});
                    my $pos = $_MIMEAltPrefs{$pctype};
                    if (defined($pos)) {
                        for (++$pos; $pos <= $#_MIMEAltPrefs; ++$pos) {
                            $alt_exc{$_MIMEAltPrefs[$pos]} = 1;
                        }
                    }
                }

                ## only add to %Cid if not excluded

lib/readmail.pl  view on Meta::CPAN

    ## the parts
    foreach $name (keys %$parm) {
        next if $name eq 'x-main';
        $parm->{$name}{'value'} = join("", @{$parm->{$name}{'vlist'}});
    }

    $parm;
}

##---------------------------------------------------------------------------##
##	MAILset_alternative_prefs() is used to set content-type
##	preferences for multipart/alternative entities.  The list
##	specified will supercede the prefered format as denoted by
##	the ording of parts in the entity.
##
##	A content-type listed earlier in the array will be prefered
##	over one later.  For example:
##
##	  MAILset_alternative_prefs('text/plain', 'text/html');
##
##	States that if a multipart/alternative entity contains a
##	text/plain part and a text/html part, the text/plain part will
##	be prefered over the text/html part.
##
sub MAILset_alternative_prefs {
    @_MIMEAltPrefs = map {lc} @_;
    %_MIMEAltPrefs = ();
    my $i = 0;
    my $ctype;
    foreach $ctype (@_MIMEAltPrefs) {
        $_MIMEAltPrefs{$ctype} = $i++;
    }
}

##---------------------------------------------------------------------------##



( run in 1.990 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )