| google@taxandfinance.com 2004-12-22, 3:55 am |
| Short story: Is there a way I can save a copy of my CGI output (the
actual HTML anyway) to use for sending a multi-part MIME message?
I am using CGI.pm and HTML::Template to present a user with a form for
submitting/viewing service requests, including the ability to attach
files. I've got that much working.
Now I need to generate a multi-part MIME message which will include the
same HTML that is returned to the client, in addition to any
attachments. I'm using MIME::Tools do to this and I've created a
SendMail function which is passed, among other things, an array refence
containing a list of files to attach and a string containing the HTML
body of the multi-part message. I don't know how I'm going to create
the HTML body though.
I had originally planned on using LWP::UserAgent to request the same
page from within the CGI script, passing the response->contents to the
SendMail function to be included as the body of the multi-part MIME
message. It's more complicated than I hoped because it uses
SSL,sessions,cookies,etc. Is there an easier way to do this using
functionality provided by CGI.pm or HTML::Template? I need to somehow
be able to save a copy of the CGI output.
Thanks,
Matt
|