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

Hey all,

Forgive my lack of research, it's a bit of work to access a mail server currently.

I'm creating a registration script for a sponsored golf tournament for my school. What I'm wondering is if I can have an image uploaded, and directly attached to a MIME::Lite object, or if it needs to be saved to a temporary file first, and then attached.

Anyone have any experience/suggestions?

Thanks in advance!

meh.
  • Comment on MIME::Lite with uploaded image attachment

Replies are listed 'Best First'.
Re: MIME::Lite with uploaded image attachment
by pileofrogs (Priest) on Jan 27, 2006 at 21:47 UTC

    I think your question boils down to, can I load data into MIME::Lite without first putting it into a file, and the answer is yes.

    From MIME::Lite :

    You can specify each message part as either the literal data itself (in a scalar or array), or as a string which can be given to open() to get a readable filehandle (e.g., "<filename" or "somecommand|").

    If getting the image data into a scalar or whatever is your problem, the answer would depend on how you're letting people upload these images and what modules you're using to achieve that.

    --Pileofrogs