Thanks, Trevor. I'm actually doing the retrieval and mail reading now pretty much as you suggest. I was hoping there might be some tools around for composing and replying to messages also. Looks like Mail::Box may have some good features to simplify that, but I'm just starting to look into that.

Thanks,

-pd


Trevor Joerges wrote:


Use Net::POP3 or Mail::POP3Client to retrieve the message, then use
MIME::Parser to parse the individual message body parts. The body parts can
be accessed and modified in memory or to disk. Once you have the parts you
can edit the HTML however you like and put it all back together using
MIME::Entity probably. Keeping track of how it was put together in the first
place will probably be the toughest part although you could probably just
retrieve the original message and write it as another body part to the
reply.

I'm glad that's not my task.

HTH,
Trevor.


----- Original Message ----- From: "Peter Davis" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, November 25, 2003 4:49 PM
Subject: Sending e-mail? Calling emacs to edit?





Please excuse the cross-post, but I'm not sure which list is more
appropriate for these questions.

I've been working on a set of Perl CGI scripts to read my e-mail, which
is in MH format (1 message per file, filename = message number).  I'm
using Earl Hood's Cygwin port of nmh for some of it, and the
MIME::Tools for some.

However, I'm now at the point of needing to send (and reply to)
messages.  I'm trying to find a way to do this from a CGI script, but to
have a decently powerful editor to compose the messages.  I think I can
do this by creating a draft message, and then calling emacs to edit it.
I still have some problems with this, though, and more than a few
questions:

1) Emacs has several modes for composing and sending messages, including
Mail mode, Message mode, MH-E's message composition, and probably others
I'm not aware of.  Any recommendations?

2) I want to do something intelligible with MIME and especially HTML
messages.  For example, if a message is HTML (or has an HTML alternative
part), I want to edit HTML, and then use lynx to generate the
corresponding text alternative before sending.

I know MIME::Tools will help me compose the outgoing MIME message, but
the problem is how to edit it in the first place.

Ideas?  Suggestions?  Pointers to existing code that solves these
problems?

Thanks very much,

-pd


-- -------- Peter Davis Funny stuff at http://www.pfdstudio.com The artwork formerly shown as prints List of resources for children's writers and illustrators at: http://www.pfdstudio.com/cwrl.html

_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs





_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs




-- -------- Peter Davis Funny stuff at http://www.pfdstudio.com List of resources for children's writers and illustrators at: http://www.pfdstudio.com/cwrl.html


_______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to