McA has asked for the wisdom of the Perl Monks concerning the following question:

Good morning,

as the subjects says: I need a recommendation for a package helping me to create correct MIME e-mails.

Why am I asking here? I found MIME::Lite where there is the following statement:

"MIME::Lite is not recommended by its current maintainer. There are a number of alternatives, like Email::MIME or MIME::Entity[...]"
Ok, I looked at Email::MIME. Did a litte example and found a bug IMHO. Looking at the bug database gave me the feeling that this package is not heavily maintained. But probably I'm wrong. Then I had a look at MIME::Entity which seems to be used, but almost all reviews are complaining about documentation and gave me the feeling to have a steep learning curve while having to look at the code.

Now, I need advice before I bet on one of them (or a totally different package).

By the way: Perl Email Project seems to be also rather comatose.

Any hints welcome.

Best regards
Andreas Mock

Replies are listed 'Best First'.
Re: Recommendation for package supporting MIME mail creation
by tobyink (Canon) on Mar 12, 2013 at 09:02 UTC

    For most e-mail needs I tend to use Mail-Box. It's rather heavy-weight because it does absolutely everything:

    • Mail retrieval - IMAP4, POP3, including SSL
    • Mail sending - SMTP, sendmail, qmail, exim
    • Accessing mail folders stored on disk - MH, Maildir, mbox, Outlook Express
    • SpamAssassin integration

    ... and, relevant to you, an OO interface for constructing, parsing and serializing MIME messages.

    As I said, it's a heavy-weight solution; a big distribution with a lot of classes to get your head around. It is good though; stable, reliable, and actively maintained.

    Mail::Message is the place to start for constructing messages.

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
Re: Recommendation for package supporting MIME mail creation
by daxim (Curate) on Mar 12, 2013 at 09:25 UTC
    I've been following PEP. Yes, it's comatose, but that's nothing that a perlcodamine injection couldn't fix. ;)

    As of 2013, Courriel::Builder and Email::Sender are the best.

      Hi all,

      thank you for the fast answers. A ++ for you both and for this answer making me laughing which I really needed at the moment. :-)

      Best regards
      McA

Re: Recommendation for package supporting MIME mail creation
by blue_cowdawg (Monsignor) on Mar 12, 2013 at 13:03 UTC
        "MIME::Lite is not recommended by its current maintainer. There are a number of alternatives, like Email::MIME or MIME::Entity..."

    I'll risk being the heretic here, but I still use MIME::Lite in spite of the caveat above. I just works and over the last bunch of years (don't remember when I started using it) I've written dozens of script using it. I suppose I should look at the more "modern" CPAN modules out there but I'm lazy.. :-)


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
Re: Recommendation for package supporting MIME mail creation
by thargas (Deacon) on Mar 13, 2013 at 13:13 UTC

    Hmm. I never found the documentation for MIME::Entity to be that difficult. The reviews on CPAN seem very positive except for a complaint about MIME::Parser (which is part of the same distro).

    The most difficult part of sending MIME email I've found is understanding MIME itself and the "restrictions" (read as "bugs") of the various email clients which might receive the message.