| [reply] |
I am using MIME::Lite but I get this error.
"Can't locate MIME/Lite.pm in @INC"
| [reply] |
| [reply] |
Then you should install it, no? Alternatively, if you already have it installed but in a non-standard directory, you should do a "use lib '/somepath';".
| [reply] |
A while back I wrote a quick object-orientated email module that may be helpful. It simplifies the whole email system and makes it easy to send email in plain or html formats with or without attachments.
You can find it here.
The most recent version should also be available at my website (at time of writing the hosting was down for maintanence but should be up again soon!).
--- Jay
All code is untested unless otherwise stated.
| [reply] |
| [reply] |
| [reply] |
FYI here only, The thing that makes an attachment in an email is a MIME header. All you are doing is dividing your text message into different parts via boundaries. You set a boundary and use it to delimit the parts of your mail message. MIME headers follow their own set of rules. Example, two \n's specify a seperation between the head and body. MIME types are diverse and give you a number of options for nesting binary data into your email. All mail messages have content-type headers just like html pages.
So a message with an attached picture would be a mixed content type. Boundaries specify where the parts are and each seperate part can also have its own content-type headers.
Obviously, a module is the fastest was to work with MIME, but if you need to go deeper the above is just a nutshell.
| [reply] |