||Jul 12, 2001 at 07:44 UTC
(20 years ago)
||Dec 12, 2012 at 19:00 UTC
(9 years ago)
Oct 17, 2021 at 12:10 -05
|For this user:||Search nodes|
I've found recently that I keep refering E-mail related posts to these same examples over and over again. The following is a list so that I can just refer people here. I'm lazy and don't want to keep looking up the id numbers :D
E-mail related examples:
Here are some general notes about a few of the common E-mail related modules:
- MIME::Parser - One of the MIME::Tools modules. One strength is dissecting individual MIME multipart E-mails (E-mail comprised of more than just a header and simple message text). Another strength is that is can be used to complement other modules such as Mail::MboxParser or Mail::POP3Client. I use it mostly to save attachments to disk. This module has some drawbacks, aside from storing attachments to disk or looking at simple header info, it is not an easy module to grok. If you need to use it for something more complex I'd look into the documentation for MIME::Entity and possibly RFC822.
- Mail::MboxParser - Great for processing mail folders provided you have a login account, know the default mail folder locations, and have Perl installed on the mail server. For example, I have a user account on a Solaris 2.8 box and know that the inboxes are stored as /mail/login and that IMAP folders (if any) are in /home/login/mail. Another strength of this module is that it can be used to easily return the plain text body of an individual message--if the E-mail has one (irregardless of which module is used to parse the mail folder).
- Mail::POP3Client - Another module great for processing mail folders. The strength here is that you can use this module to process your inbox remotely. All you need is the name of the mail server, your login and password.
- MIME::Lite - A simple tool for creating/sending E-mails with or without attachments. The documentation has some good examples.