1MIME::Lite(3) User Contributed Perl Documentation MIME::Lite(3)
2
3
4
6 MIME::Lite - low-calorie MIME generator
7
9 MIME::Lite is not recommended by its current maintainer. There are a
10 number of alternatives, like Email::MIME or MIME::Entity and
11 Email::Sender, which you should probably use instead. MIME::Lite
12 continues to accrue weird bug reports, and it is not receiving a large
13 amount of refactoring due to the availability of better alternatives.
14 Please consider using something else.
15
17 Create and send using the default send method for your OS a single-part
18 message:
19
20 use MIME::Lite;
21 ### Create a new single-part message, to send a GIF file:
22 $msg = MIME::Lite->new(
23 From => 'me@myhost.com',
24 To => 'you@yourhost.com',
25 Cc => 'some@other.com, some@more.com',
26 Subject => 'Helloooooo, nurse!',
27 Type => 'image/gif',
28 Encoding => 'base64',
29 Path => 'hellonurse.gif'
30 );
31 $msg->send; # send via default
32
33 Create a multipart message (i.e., one with attachments) and send it via
34 SMTP
35
36 ### Create a new multipart message:
37 $msg = MIME::Lite->new(
38 From => 'me@myhost.com',
39 To => 'you@yourhost.com',
40 Cc => 'some@other.com, some@more.com',
41 Subject => 'A message with 2 parts...',
42 Type => 'multipart/mixed'
43 );
44
45 ### Add parts (each "attach" has same arguments as "new"):
46 $msg->attach(
47 Type => 'TEXT',
48 Data => "Here's the GIF file you wanted"
49 );
50 $msg->attach(
51 Type => 'image/gif',
52 Path => 'aaa000123.gif',
53 Filename => 'logo.gif',
54 Disposition => 'attachment'
55 );
56 ### use Net::SMTP to do the sending
57 $msg->send('smtp','some.host', Debug=>1 );
58
59 Output a message:
60
61 ### Format as a string:
62 $str = $msg->as_string;
63
64 ### Print to a filehandle (say, a "sendmail" stream):
65 $msg->print(\*SENDMAIL);
66
67 Send a message:
68
69 ### Send in the "best" way (the default is to use "sendmail"):
70 $msg->send;
71 ### Send a specific way:
72 $msg->send('type',@args);
73
74 Specify default send method:
75
76 MIME::Lite->send('smtp','some.host',Debug=>0);
77
78 with authentication
79
80 MIME::Lite->send('smtp','some.host', AuthUser=>$user, AuthPass=>$pass);
81
82 using SSL
83
84 MIME::Lite->send('smtp','some.host', SSL => 1, Port => 465 );
85
87 In the never-ending quest for great taste with fewer calories, we
88 proudly present: MIME::Lite.
89
90 MIME::Lite is intended as a simple, standalone module for generating
91 (not parsing!) MIME messages... specifically, it allows you to output a
92 simple, decent single- or multi-part message with text or binary
93 attachments. It does not require that you have the Mail:: or MIME::
94 modules installed, but will work with them if they are.
95
96 You can specify each message part as either the literal data itself (in
97 a scalar or array), or as a string which can be given to open() to get
98 a readable filehandle (e.g., "<filename" or "somecommand|").
99
100 You don't need to worry about encoding your message data: this module
101 will do that for you. It handles the 5 standard MIME encodings.
102
104 Create a simple message containing just text
105 $msg = MIME::Lite->new(
106 From =>'me@myhost.com',
107 To =>'you@yourhost.com',
108 Cc =>'some@other.com, some@more.com',
109 Subject =>'Helloooooo, nurse!',
110 Data =>"How's it goin', eh?"
111 );
112
113 Create a simple message containing just an image
114 $msg = MIME::Lite->new(
115 From =>'me@myhost.com',
116 To =>'you@yourhost.com',
117 Cc =>'some@other.com, some@more.com',
118 Subject =>'Helloooooo, nurse!',
119 Type =>'image/gif',
120 Encoding =>'base64',
121 Path =>'hellonurse.gif'
122 );
123
124 Create a multipart message
125 ### Create the multipart "container":
126 $msg = MIME::Lite->new(
127 From =>'me@myhost.com',
128 To =>'you@yourhost.com',
129 Cc =>'some@other.com, some@more.com',
130 Subject =>'A message with 2 parts...',
131 Type =>'multipart/mixed'
132 );
133
134 ### Add the text message part:
135 ### (Note that "attach" has same arguments as "new"):
136 $msg->attach(
137 Type =>'TEXT',
138 Data =>"Here's the GIF file you wanted"
139 );
140
141 ### Add the image part:
142 $msg->attach(
143 Type =>'image/gif',
144 Path =>'aaa000123.gif',
145 Filename =>'logo.gif',
146 Disposition => 'attachment'
147 );
148
149 Attach a GIF to a text message
150 This will create a multipart message exactly as above, but using the
151 "attach to singlepart" hack:
152
153 ### Start with a simple text message:
154 $msg = MIME::Lite->new(
155 From =>'me@myhost.com',
156 To =>'you@yourhost.com',
157 Cc =>'some@other.com, some@more.com',
158 Subject =>'A message with 2 parts...',
159 Type =>'TEXT',
160 Data =>"Here's the GIF file you wanted"
161 );
162
163 ### Attach a part... the make the message a multipart automatically:
164 $msg->attach(
165 Type =>'image/gif',
166 Path =>'aaa000123.gif',
167 Filename =>'logo.gif'
168 );
169
170 Attach a pre-prepared part to a message
171 ### Create a standalone part:
172 $part = MIME::Lite->new(
173 Top => 0,
174 Type =>'text/html',
175 Data =>'<H1>Hello</H1>',
176 );
177 $part->attr('content-type.charset' => 'UTF-8');
178 $part->add('X-Comment' => 'A message for you');
179
180 ### Attach it to any message:
181 $msg->attach($part);
182
183 Print a message to a filehandle
184 ### Write it to a filehandle:
185 $msg->print(\*STDOUT);
186
187 ### Write just the header:
188 $msg->print_header(\*STDOUT);
189
190 ### Write just the encoded body:
191 $msg->print_body(\*STDOUT);
192
193 Print a message into a string
194 ### Get entire message as a string:
195 $str = $msg->as_string;
196
197 ### Get just the header:
198 $str = $msg->header_as_string;
199
200 ### Get just the encoded body:
201 $str = $msg->body_as_string;
202
203 Send a message
204 ### Send in the "best" way (the default is to use "sendmail"):
205 $msg->send;
206
207 Send an HTML document... with images included!
208 $msg = MIME::Lite->new(
209 To =>'you@yourhost.com',
210 Subject =>'HTML with in-line images!',
211 Type =>'multipart/related'
212 );
213 $msg->attach(
214 Type => 'text/html',
215 Data => qq{
216 <body>
217 Here's <i>my</i> image:
218 <img src="cid:myimage.gif">
219 </body>
220 },
221 );
222 $msg->attach(
223 Type => 'image/gif',
224 Id => 'myimage.gif',
225 Path => '/path/to/somefile.gif',
226 );
227 $msg->send();
228
229 Change how messages are sent
230 ### Do something like this in your 'main':
231 if ($I_DONT_HAVE_SENDMAIL) {
232 MIME::Lite->send('smtp', $host, Timeout=>60,
233 AuthUser=>$user, AuthPass=>$pass);
234 }
235
236 ### Now this will do the right thing:
237 $msg->send; ### will now use Net::SMTP as shown above
238
240 Global configuration
241 To alter the way the entire module behaves, you have the following
242 methods/options:
243
244 MIME::Lite->field_order()
245 When used as a classmethod, this changes the default order in which
246 headers are output for all messages. However, please consider
247 using the instance method variant instead, so you won't stomp on
248 other message senders in the same application.
249
250 MIME::Lite->quiet()
251 This classmethod can be used to suppress/unsuppress all warnings
252 coming from this module.
253
254 MIME::Lite->send()
255 When used as a classmethod, this can be used to specify a different
256 default mechanism for sending message. The initial default is:
257
258 MIME::Lite->send("sendmail", "/usr/lib/sendmail -t -oi -oem");
259
260 However, you should consider the similar but smarter and taint-safe
261 variant:
262
263 MIME::Lite->send("sendmail");
264
265 Or, for non-Unix users:
266
267 MIME::Lite->send("smtp");
268
269 $MIME::Lite::AUTO_CC
270 If true, automatically send to the Cc/Bcc addresses for
271 send_by_smtp(). Default is true.
272
273 $MIME::Lite::AUTO_CONTENT_TYPE
274 If true, try to automatically choose the content type from the file
275 name in "new()"/"build()". In other words, setting this true
276 changes the default "Type" from "TEXT" to "AUTO".
277
278 Default is false, since we must maintain backwards-compatibility
279 with prior behavior. Please consider keeping it false, and just
280 using Type 'AUTO' when you build() or attach().
281
282 $MIME::Lite::AUTO_ENCODE
283 If true, automatically choose the encoding from the content type.
284 Default is true.
285
286 $MIME::Lite::AUTO_VERIFY
287 If true, check paths to attachments right before printing, raising
288 an exception if any path is unreadable. Default is true.
289
290 $MIME::Lite::PARANOID
291 If true, we won't attempt to use MIME::Base64, MIME::QuotedPrint,
292 or MIME::Types, even if they're available. Default is false.
293 Please consider keeping it false, and trusting these other packages
294 to do the right thing.
295
296 Construction
297 new [PARAMHASH]
298 Class method, constructor. Create a new message object.
299
300 If any arguments are given, they are passed into "build()";
301 otherwise, just the empty object is created.
302
303 attach PART
304 attach PARAMHASH...
305 Instance method. Add a new part to this message, and return the
306 new part.
307
308 If you supply a single PART argument, it will be regarded as a
309 MIME::Lite object to be attached. Otherwise, this method assumes
310 that you are giving in the pairs of a PARAMHASH which will be sent
311 into "new()" to create the new part.
312
313 One of the possibly-quite-useful hacks thrown into this is the
314 "attach-to-singlepart" hack: if you attempt to attach a part (let's
315 call it "part 1") to a message that doesn't have a content-type of
316 "multipart" or "message", the following happens:
317
318 · A new part (call it "part 0") is made.
319
320 · The MIME attributes and data (but not the other headers) are
321 cut from the "self" message, and pasted into "part 0".
322
323 · The "self" is turned into a "multipart/mixed" message.
324
325 · The new "part 0" is added to the "self", and then "part 1" is
326 added.
327
328 One of the nice side-effects is that you can create a text message
329 and then add zero or more attachments to it, much in the same way
330 that a user agent like Netscape allows you to do.
331
332 build [PARAMHASH]
333 Class/instance method, initializer. Create (or initialize) a MIME
334 message object. Normally, you'll use the following keys in
335 PARAMHASH:
336
337 * Data, FH, or Path (either one of these, or none if multipart)
338 * Type (e.g., "image/jpeg")
339 * From, To, and Subject (if this is the "top level" of a message)
340
341 The PARAMHASH can contain the following keys:
342
343 (fieldname)
344 Any field you want placed in the message header, taken from the
345 standard list of header fields (you don't need to worry about
346 case):
347
348 Approved Encrypted Received Sender
349 Bcc From References Subject
350 Cc Keywords Reply-To To
351 Comments Message-ID Resent-* X-*
352 Content-* MIME-Version Return-Path
353 Date Organization
354
355 To give experienced users some veto power, these fields will be
356 set after the ones I set... so be careful: don't set any MIME
357 fields (like "Content-type") unless you know what you're doing!
358
359 To specify a fieldname that's not in the above list, even one
360 that's identical to an option below, just give it with a
361 trailing ":", like "My-field:". When in doubt, that always
362 signals a mail field (and it sort of looks like one too).
363
364 Data
365 Alternative to "Path" or "FH". The actual message data. This
366 may be a scalar or a ref to an array of strings; if the latter,
367 the message consists of a simple concatenation of all the
368 strings in the array.
369
370 Datestamp
371 Optional. If given true (or omitted), we force the creation of
372 a "Date:" field stamped with the current date/time if this is a
373 top-level message. You may want this if using send_by_smtp().
374 If you don't want this to be done, either provide your own Date
375 or explicitly set this to false.
376
377 Disposition
378 Optional. The content disposition, "inline" or "attachment".
379 The default is "inline".
380
381 Encoding
382 Optional. The content transfer encoding that should be used to
383 encode your data:
384
385 Use encoding: | If your message contains:
386 ------------------------------------------------------------
387 7bit | Only 7-bit text, all lines <1000 characters
388 8bit | 8-bit text, all lines <1000 characters
389 quoted-printable | 8-bit text or long lines (more reliable than "8bit")
390 base64 | Largely non-textual data: a GIF, a tar file, etc.
391
392 The default is taken from the Type; generally it is "binary"
393 (no encoding) for text/*, message/*, and multipart/*, and
394 "base64" for everything else. A value of "binary" is generally
395 not suitable for sending anything but ASCII text files with
396 lines under 1000 characters, so consider using one of the other
397 values instead.
398
399 In the case of "7bit"/"8bit", long lines are automatically
400 chopped to legal length; in the case of "7bit", all 8-bit
401 characters are automatically removed. This may not be what you
402 want, so pick your encoding well! For more info, see "A MIME
403 PRIMER".
404
405 FH Alternative to "Data" or "Path". Filehandle containing the
406 data, opened for reading. See "ReadNow" also.
407
408 Filename
409 Optional. The name of the attachment. You can use this to
410 supply a recommended filename for the end-user who is saving
411 the attachment to disk. You only need this if the filename at
412 the end of the "Path" is inadequate, or if you're using "Data"
413 instead of "Path". You should not put path information in here
414 (e.g., no "/" or "\" or ":" characters should be used).
415
416 Id Optional. Same as setting "content-id".
417
418 Length
419 Optional. Set the content length explicitly. Normally, this
420 header is automatically computed, but only under certain
421 circumstances (see "Benign limitations").
422
423 Path
424 Alternative to "Data" or "FH". Path to a file containing the
425 data... actually, it can be any open()able expression. If it
426 looks like a path, the last element will automatically be
427 treated as the filename. See "ReadNow" also.
428
429 ReadNow
430 Optional, for use with "Path". If true, will open the path and
431 slurp the contents into core now. This is useful if the Path
432 points to a command and you don't want to run the command over
433 and over if outputting the message several times. Fatal
434 exception raised if the open fails.
435
436 Top Optional. If defined, indicates whether or not this is a "top-
437 level" MIME message. The parts of a multipart message are not
438 top-level. Default is true.
439
440 Type
441 Optional. The MIME content type, or one of these special
442 values (case-sensitive):
443
444 "TEXT" means "text/plain"
445 "BINARY" means "application/octet-stream"
446 "AUTO" means attempt to guess from the filename, falling back
447 to 'application/octet-stream'. This is good if you have
448 MIME::Types on your system and you have no idea what
449 file might be used for the attachment.
450
451 The default is "TEXT", but it will be "AUTO" if you set
452 $AUTO_CONTENT_TYPE to true (sorry, but you have to enable it
453 explicitly, since we don't want to break code which depends on
454 the old behavior).
455
456 A picture being worth 1000 words (which is of course 2000 bytes, so
457 it's probably more of an "icon" than a "picture", but I
458 digress...), here are some examples:
459
460 $msg = MIME::Lite->build(
461 From => 'yelling@inter.com',
462 To => 'stocking@fish.net',
463 Subject => "Hi there!",
464 Type => 'TEXT',
465 Encoding => '7bit',
466 Data => "Just a quick note to say hi!"
467 );
468
469 $msg = MIME::Lite->build(
470 From => 'dorothy@emerald-city.oz',
471 To => 'gesundheit@edu.edu.edu',
472 Subject => "A gif for U"
473 Type => 'image/gif',
474 Path => "/home/httpd/logo.gif"
475 );
476
477 $msg = MIME::Lite->build(
478 From => 'laughing@all.of.us',
479 To => 'scarlett@fiddle.dee.de',
480 Subject => "A gzipp'ed tar file",
481 Type => 'x-gzip',
482 Path => "gzip < /usr/inc/somefile.tar |",
483 ReadNow => 1,
484 Filename => "somefile.tgz"
485 );
486
487 To show you what's really going on, that last example could also
488 have been written:
489
490 $msg = new MIME::Lite;
491 $msg->build(
492 Type => 'x-gzip',
493 Path => "gzip < /usr/inc/somefile.tar |",
494 ReadNow => 1,
495 Filename => "somefile.tgz"
496 );
497 $msg->add(From => "laughing@all.of.us");
498 $msg->add(To => "scarlett@fiddle.dee.de");
499 $msg->add(Subject => "A gzipp'ed tar file");
500
501 Setting/getting headers and attributes
502 add TAG,VALUE
503 Instance method. Add field TAG with the given VALUE to the end of
504 the header. The TAG will be converted to all-lowercase, and the
505 VALUE will be made "safe" (returns will be given a trailing space).
506
507 Beware: any MIME fields you "add" will override any MIME attributes
508 I have when it comes time to output those fields. Normally, you
509 will use this method to add non-MIME fields:
510
511 $msg->add("Subject" => "Hi there!");
512
513 Giving VALUE as an arrayref will cause all those values to be
514 added. This is only useful for special multiple-valued fields like
515 "Received":
516
517 $msg->add("Received" => ["here", "there", "everywhere"]
518
519 Giving VALUE as the empty string adds an invisible placeholder to
520 the header, which can be used to suppress the output of the
521 "Content-*" fields or the special "MIME-Version" field. When
522 suppressing fields, you should use replace() instead of add():
523
524 $msg->replace("Content-disposition" => "");
525
526 Note: add() is probably going to be more efficient than
527 "replace()", so you're better off using it for most applications if
528 you are certain that you don't need to delete() the field first.
529
530 Note: the name comes from Mail::Header.
531
532 attr ATTR,[VALUE]
533 Instance method. Set MIME attribute ATTR to the string VALUE.
534 ATTR is converted to all-lowercase. This method is normally used
535 to set/get MIME attributes:
536
537 $msg->attr("content-type" => "text/html");
538 $msg->attr("content-type.charset" => "US-ASCII");
539 $msg->attr("content-type.name" => "homepage.html");
540
541 This would cause the final output to look something like this:
542
543 Content-type: text/html; charset=US-ASCII; name="homepage.html"
544
545 Note that the special empty sub-field tag indicates the anonymous
546 first sub-field.
547
548 Giving VALUE as undefined will cause the contents of the named
549 subfield to be deleted.
550
551 Supplying no VALUE argument just returns the attribute's value:
552
553 $type = $msg->attr("content-type"); ### returns "text/html"
554 $name = $msg->attr("content-type.name"); ### returns "homepage.html"
555
556 delete TAG
557 Instance method. Delete field TAG with the given VALUE to the end
558 of the header. The TAG will be converted to all-lowercase.
559
560 $msg->delete("Subject");
561
562 Note: the name comes from Mail::Header.
563
564 field_order FIELD,...FIELD
565 Class/instance method. Change the order in which header fields are
566 output for this object:
567
568 $msg->field_order('from', 'to', 'content-type', 'subject');
569
570 When used as a class method, changes the default settings for all
571 objects:
572
573 MIME::Lite->field_order('from', 'to', 'content-type', 'subject');
574
575 Case does not matter: all field names will be coerced to lowercase.
576 In either case, supply the empty array to restore the default
577 ordering.
578
579 fields
580 Instance method. Return the full header for the object, as a ref
581 to an array of "[TAG, VALUE]" pairs, where each TAG is all-
582 lowercase. Note that any fields the user has explicitly set will
583 override the corresponding MIME fields that we would otherwise
584 generate. So, don't say...
585
586 $msg->set("Content-type" => "text/html; charset=US-ASCII");
587
588 unless you want the above value to override the "Content-type" MIME
589 field that we would normally generate.
590
591 Note: I called this "fields" because the header() method of
592 Mail::Header returns something different, but similar enough to be
593 confusing.
594
595 You can change the order of the fields: see "field_order". You
596 really shouldn't need to do this, but some people have to deal with
597 broken mailers.
598
599 filename [FILENAME]
600 Instance method. Set the filename which this data will be reported
601 as. This actually sets both "standard" attributes.
602
603 With no argument, returns the filename as dictated by the content-
604 disposition.
605
606 get TAG,[INDEX]
607 Instance method. Get the contents of field TAG, which might have
608 been set with set() or replace(). Returns the text of the field.
609
610 $ml->get('Subject', 0);
611
612 If the optional 0-based INDEX is given, then we return the INDEX'th
613 occurrence of field TAG. Otherwise, we look at the context: In a
614 scalar context, only the first (0th) occurrence of the field is
615 returned; in an array context, all occurrences are returned.
616
617 Warning: this should only be used with non-MIME fields. Behavior
618 with MIME fields is TBD, and will raise an exception for now.
619
620 get_length
621 Instance method. Recompute the content length for the message if
622 the process is trivial, setting the "content-length" attribute as a
623 side-effect:
624
625 $msg->get_length;
626
627 Returns the length, or undefined if not set.
628
629 Note: the content length can be difficult to compute, since it
630 involves assembling the entire encoded body and taking the length
631 of it (which, in the case of multipart messages, means freezing all
632 the sub-parts, etc.).
633
634 This method only sets the content length to a defined value if the
635 message is a singlepart with "binary" encoding, and the body is
636 available either in-core or as a simple file. Otherwise, the
637 content length is set to the undefined value.
638
639 Since content-length is not a standard MIME field anyway (that's
640 right, kids: it's not in the MIME RFCs, it's an HTTP thing), this
641 seems pretty fair.
642
643 parts
644 Instance method. Return the parts of this entity, and this entity
645 only. Returns empty array if this entity has no parts.
646
647 This is not recursive! Parts can have sub-parts; use parts_DFS()
648 to get everything.
649
650 parts_DFS
651 Instance method. Return the list of all MIME::Lite objects
652 included in the entity, starting with the entity itself, in depth-
653 first-search order. If this object has no parts, it alone will be
654 returned.
655
656 preamble [TEXT]
657 Instance method. Get/set the preamble string, assuming that this
658 object has subparts. Set it to undef for the default string.
659
660 replace TAG,VALUE
661 Instance method. Delete all occurrences of fields named TAG, and
662 add a new field with the given VALUE. TAG is converted to all-
663 lowercase.
664
665 Beware the special MIME fields (MIME-version, Content-*): if you
666 "replace" a MIME field, the replacement text will override the
667 actual MIME attributes when it comes time to output that field. So
668 normally you use attr() to change MIME fields and add()/replace()
669 to change non-MIME fields:
670
671 $msg->replace("Subject" => "Hi there!");
672
673 Giving VALUE as the empty string will effectively prevent that
674 field from being output. This is the correct way to suppress the
675 special MIME fields:
676
677 $msg->replace("Content-disposition" => "");
678
679 Giving VALUE as undefined will just cause all explicit values for
680 TAG to be deleted, without having any new values added.
681
682 Note: the name of this method comes from Mail::Header.
683
684 scrub
685 Instance method. This is Alpha code. If you use it, please let me
686 know how it goes. Recursively goes through the "parts" tree of
687 this message and tries to find MIME attributes that can be removed.
688 With an array argument, removes exactly those attributes; e.g.:
689
690 $msg->scrub(['content-disposition', 'content-length']);
691
692 Is the same as recursively doing:
693
694 $msg->replace('Content-disposition' => '');
695 $msg->replace('Content-length' => '');
696
697 Setting/getting message data
698 binmode [OVERRIDE]
699 Instance method. With no argument, returns whether or not it
700 thinks that the data (as given by the "Path" argument of "build()")
701 should be read using binmode() (for example, when "read_now()" is
702 invoked).
703
704 The default behavior is that any content type other than "text/*"
705 or "message/*" is binmode'd; this should in general work fine.
706
707 With a defined argument, this method sets an explicit "override"
708 value. An undefined argument unsets the override. The new current
709 value is returned.
710
711 data [DATA]
712 Instance method. Get/set the literal DATA of the message. The
713 DATA may be either a scalar, or a reference to an array of scalars
714 (which will simply be joined).
715
716 Warning: setting the data causes the "content-length" attribute to
717 be recomputed (possibly to nothing).
718
719 fh [FILEHANDLE]
720 Instance method. Get/set the FILEHANDLE which contains the message
721 data.
722
723 Takes a filehandle as an input and stores it in the object. This
724 routine is similar to path(); one important difference is that no
725 attempt is made to set the content length.
726
727 path [PATH]
728 Instance method. Get/set the PATH to the message data.
729
730 Warning: setting the path recomputes any existing "content-length"
731 field, and re-sets the "filename" (to the last element of the path
732 if it looks like a simple path, and to nothing if not).
733
734 resetfh [FILEHANDLE]
735 Instance method. Set the current position of the filehandle back
736 to the beginning. Only applies if you used "FH" in build() or
737 attach() for this message.
738
739 Returns false if unable to reset the filehandle (since not all
740 filehandles are seekable).
741
742 read_now
743 Instance method. Forces data from the path/filehandle (as
744 specified by "build()") to be read into core immediately, just as
745 though you had given it literally with the "Data" keyword.
746
747 Note that the in-core data will always be used if available.
748
749 Be aware that everything is slurped into a giant scalar: you may
750 not want to use this if sending tar files! The benefit of not
751 reading in the data is that very large files can be handled by this
752 module if left on disk until the message is output via "print()" or
753 "print_body()".
754
755 sign PARAMHASH
756 Instance method. Sign the message. This forces the message to be
757 read into core, after which the signature is appended to it.
758
759 Data
760 As in "build()": the literal signature data. Can be either a
761 scalar or a ref to an array of scalars.
762
763 Path
764 As in "build()": the path to the file.
765
766 If no arguments are given, the default is:
767
768 Path => "$ENV{HOME}/.signature"
769
770 The content-length is recomputed.
771
772 verify_data
773 Instance method. Verify that all "paths" to attached data exist,
774 recursively. It might be a good idea for you to do this before a
775 print(), to prevent accidental partial output if a file might be
776 missing. Raises exception if any path is not readable.
777
778 Output
779 print [OUTHANDLE]
780 Instance method. Print the message to the given output handle, or
781 to the currently-selected filehandle if none was given.
782
783 All OUTHANDLE has to be is a filehandle (possibly a glob ref), or
784 any object that responds to a print() message.
785
786 print_body [OUTHANDLE] [IS_SMTP]
787 Instance method. Print the body of a message to the given output
788 handle, or to the currently-selected filehandle if none was given.
789
790 All OUTHANDLE has to be is a filehandle (possibly a glob ref), or
791 any object that responds to a print() message.
792
793 Fatal exception raised if unable to open any of the input files, or
794 if a part contains no data, or if an unsupported encoding is
795 encountered.
796
797 IS_SMPT is a special option to handle SMTP mails a little more
798 intelligently than other send mechanisms may require. Specifically
799 this ensures that the last byte sent is NOT '\n' (octal \012) if
800 the last two bytes are not '\r\n' (\015\012) as this will cause
801 some SMTP servers to hang.
802
803 print_header [OUTHANDLE]
804 Instance method. Print the header of the message to the given
805 output handle, or to the currently-selected filehandle if none was
806 given.
807
808 All OUTHANDLE has to be is a filehandle (possibly a glob ref), or
809 any object that responds to a print() message.
810
811 as_string
812 Instance method. Return the entire message as a string, with a
813 header and an encoded body.
814
815 body_as_string
816 Instance method. Return the encoded body as a string. This is the
817 portion after the header and the blank line.
818
819 Note: actually prepares the body by "printing" to a scalar. Proof
820 that you can hand the "print*()" methods any blessed object that
821 responds to a "print()" message.
822
823 header_as_string
824 Instance method. Return the header as a string.
825
826 Sending
827 send
828 send HOW, HOWARGS...
829 Class/instance method. This is the principal method for sending
830 mail, and for configuring how mail will be sent.
831
832 As a class method with a HOW argument and optional HOWARGS, it sets
833 the default sending mechanism that the no-argument instance method
834 will use. The HOW is a facility name (see below), and the HOWARGS
835 is interpreted by the facility. The class method returns the
836 previous HOW and HOWARGS as an array.
837
838 MIME::Lite->send('sendmail', "d:\\programs\\sendmail.exe");
839 ...
840 $msg = MIME::Lite->new(...);
841 $msg->send;
842
843 As an instance method with arguments (a HOW argument and optional
844 HOWARGS), sends the message in the requested manner; e.g.:
845
846 $msg->send('sendmail', "d:\\programs\\sendmail.exe");
847
848 As an instance method with no arguments, sends the message by the
849 default mechanism set up by the class method. Returns whatever the
850 mail-handling routine returns: this should be true on success,
851 false/exception on error:
852
853 $msg = MIME::Lite->new(From=>...);
854 $msg->send || die "you DON'T have mail!";
855
856 On Unix systems (or rather non-Win32 systems), the default setting
857 is equivalent to:
858
859 MIME::Lite->send("sendmail", "/usr/lib/sendmail -t -oi -oem");
860
861 On Win32 systems the default setting is equivalent to:
862
863 MIME::Lite->send("smtp");
864
865 The assumption is that on Win32 your site/lib/Net/libnet.cfg file
866 will be preconfigured to use the appropriate SMTP server. See below
867 for configuring for authentication.
868
869 There are three facilities:
870
871 "sendmail", ARGS...
872 Send a message by piping it into the "sendmail" command. Uses
873 the send_by_sendmail() method, giving it the ARGS. This usage
874 implements (and deprecates) the "sendmail()" method.
875
876 "smtp", [HOSTNAME, [NAMEDPARMS] ]
877 Send a message by SMTP, using optional HOSTNAME as SMTP-sending
878 host. Net::SMTP will be required. Uses the send_by_smtp()
879 method. Any additional arguments passed in will also be passed
880 through to send_by_smtp. This is useful for things like mail
881 servers requiring authentication where you can say something
882 like the following
883
884 MIME::Lite->send('smtp', $host, AuthUser=>$user, AuthPass=>$pass);
885
886 which will configure things so future uses of
887
888 $msg->send();
889
890 do the right thing.
891
892 "sub", \&SUBREF, ARGS...
893 Sends a message MSG by invoking the subroutine SUBREF of your
894 choosing, with MSG as the first argument, and ARGS following.
895
896 For example: let's say you're on an OS which lacks the usual Unix
897 "sendmail" facility, but you've installed something a lot like it,
898 and you need to configure your Perl script to use this
899 "sendmail.exe" program. Do this following in your script's setup:
900
901 MIME::Lite->send('sendmail', "d:\\programs\\sendmail.exe");
902
903 Then, whenever you need to send a message $msg, just say:
904
905 $msg->send;
906
907 That's it. Now, if you ever move your script to a Unix box, all
908 you need to do is change that line in the setup and you're done.
909 All of your $msg->send invocations will work as expected.
910
911 After sending, the method last_send_successful() can be used to
912 determine if the send was successful or not.
913
914 send_by_sendmail SENDMAILCMD
915 send_by_sendmail PARAM=>VALUE, ARRAY, HASH...
916 Instance method. Send message via an external "sendmail" program
917 (this will probably only work out-of-the-box on Unix systems).
918
919 Returns true on success, false or exception on error.
920
921 You can specify the program and all its arguments by giving a
922 single string, SENDMAILCMD. Nothing fancy is done; the message is
923 simply piped in.
924
925 However, if your needs are a little more advanced, you can specify
926 zero or more of the following PARAM/VALUE pairs (or a reference to
927 hash or array of such arguments as well as any combination
928 thereof); a Unix-style, taint-safe "sendmail" command will be
929 constructed for you:
930
931 Sendmail
932 Full path to the program to use. Default is
933 "/usr/lib/sendmail".
934
935 BaseArgs
936 Ref to the basic array of arguments we start with. Default is
937 "["-t", "-oi", "-oem"]".
938
939 SetSender
940 Unless this is explicitly given as false, we attempt to
941 automatically set the "-f" argument to the first address that
942 can be extracted from the "From:" field of the message (if
943 there is one).
944
945 What is the -f, and why do we use it? Suppose we did not use
946 "-f", and you gave an explicit "From:" field in your message:
947 in this case, the sendmail "envelope" would indicate the real
948 user your process was running under, as a way of preventing
949 mail forgery. Using the "-f" switch causes the sender to be
950 set in the envelope as well.
951
952 So when would I NOT want to use it? If sendmail doesn't regard
953 you as a "trusted" user, it will permit the "-f" but also add
954 an "X-Authentication-Warning" header to the message to indicate
955 a forged envelope. To avoid this, you can either (1) have
956 SetSender be false, or (2) make yourself a trusted user by
957 adding a "T" configuration
958 command to your sendmail.cf file
959 (e.g.: "Teryq" if the script is running as user "eryq").
960
961 FromSender
962 If defined, this is identical to setting SetSender to true,
963 except that instead of looking at the "From:" field we use the
964 address given by this option. Thus:
965
966 FromSender => 'me@myhost.com'
967
968 After sending, the method last_send_successful() can be used to
969 determine if the send was successful or not.
970
971 send_by_smtp HOST, ARGS...
972 send_by_smtp REF, HOST, ARGS
973 Instance method. Send message via SMTP, using Net::SMTP -- which
974 will be required for this feature.
975
976 HOST is the name of SMTP server to connect to, or undef to have
977 Net::SMTP use the defaults in Libnet.cfg.
978
979 ARGS are a list of key value pairs which may be selected from the
980 list below. Many of these are just passed through to specific
981 Net::SMTP commands and you should review that module for details.
982
983 Please see Good-vs-bad email addresses with send_by_smtp()
984
985 Hello
986 LocalAddr
987 LocalPort
988 Timeout
989 Port
990 ExactAddresses
991 Debug
992 See Net::SMTP::new() for details.
993
994 Size
995 Return
996 Bits
997 Transaction
998 Envelope
999 See Net::SMTP::mail() for details.
1000
1001 SkipBad
1002 If true doesn't throw an error when multiple email addresses
1003 are provided and some are not valid. See Net::SMTP::recipient()
1004 for details.
1005
1006 AuthUser
1007 Authenticate with Net::SMTP::auth() using this username.
1008
1009 AuthPass
1010 Authenticate with Net::SMTP::auth() using this password.
1011
1012 NoAuth
1013 Normally if AuthUser and AuthPass are defined MIME::Lite will
1014 attempt to use them with the Net::SMTP::auth() command to
1015 authenticate the connection, however if this value is true then
1016 no authentication occurs.
1017
1018 To Sets the addresses to send to. Can be a string or a reference
1019 to an array of strings. Normally this is extracted from the To:
1020 (and Cc: and Bcc: fields if $AUTO_CC is true).
1021
1022 This value overrides that.
1023
1024 From
1025 Sets the email address to send from. Normally this value is
1026 extracted from the Return-Path: or From: field of the mail
1027 itself (in that order).
1028
1029 This value overrides that.
1030
1031 Returns: True on success, croaks with an error message on failure.
1032
1033 After sending, the method last_send_successful() can be used to
1034 determine if the send was successful or not.
1035
1036 send_by_testfile FILENAME
1037 Instance method. Print message to a file (namely FILENAME), which
1038 will default to mailer.testfile If file exists, message will be
1039 appended.
1040
1041 last_send_successful
1042 This method will return TRUE if the last send() or send_by_XXX()
1043 method call was successful. It will return defined but false if it
1044 was not successful, and undefined if the object had not been used
1045 to send yet.
1046
1047 sendmail COMMAND...
1048 Class method, DEPRECATED. Declare the sender to be "sendmail", and
1049 set up the "sendmail" command. You should use send() instead.
1050
1051 Miscellaneous
1052 quiet ONOFF
1053 Class method. Suppress/unsuppress all warnings coming from this
1054 module.
1055
1056 MIME::Lite->quiet(1); ### I know what I'm doing
1057
1058 I recommend that you include that comment as well. And while you
1059 type it, say it out loud: if it doesn't feel right, then maybe you
1060 should reconsider the whole line. ";-)"
1061
1063 How do I prevent "Content" headers from showing up in my mail reader?
1064 Apparently, some people are using mail readers which display the MIME
1065 headers like "Content-disposition", and they want MIME::Lite not to
1066 generate them "because they look ugly".
1067
1068 Sigh.
1069
1070 Y'know, kids, those headers aren't just there for cosmetic purposes.
1071 They help ensure that the message is understood correctly by mail
1072 readers. But okay, you asked for it, you got it... here's how you can
1073 suppress the standard MIME headers. Before you send the message, do
1074 this:
1075
1076 $msg->scrub;
1077
1078 You can scrub() any part of a multipart message independently; just be
1079 aware that it works recursively. Before you scrub, note the rules that
1080 I follow:
1081
1082 Content-type
1083 You can safely scrub the "content-type" attribute if, and only if,
1084 the part is of type "text/plain" with charset "us-ascii".
1085
1086 Content-transfer-encoding
1087 You can safely scrub the "content-transfer-encoding" attribute if,
1088 and only if, the part uses "7bit", "8bit", or "binary" encoding.
1089 You are far better off doing this if your lines are under 1000
1090 characters. Generally, that means you can scrub it for plain text,
1091 and you can not scrub this for images, etc.
1092
1093 Content-disposition
1094 You can safely scrub the "content-disposition" attribute if you
1095 trust the mail reader to do the right thing when it decides whether
1096 to show an attachment inline or as a link. Be aware that scrubbing
1097 both the content-disposition and the content-type means that there
1098 is no way to "recommend" a filename for the attachment!
1099
1100 Note: there are reports of brain-dead MUAs out there that do the
1101 wrong thing if you provide the content-disposition. If your
1102 attachments keep showing up inline or vice-versa, try scrubbing
1103 this attribute.
1104
1105 Content-length
1106 You can always scrub "content-length" safely.
1107
1108 How do I give my attachment a [different] recommended filename?
1109 By using the Filename option (which is different from Path!):
1110
1111 $msg->attach(Type => "image/gif",
1112 Path => "/here/is/the/real/file.GIF",
1113 Filename => "logo.gif");
1114
1115 You should not put path information in the Filename.
1116
1117 Working with UTF-8 and other character sets
1118 All text that is added to your mail message should be properly encoded.
1119 MIME::Lite doesn't do this for you. For instance, if you want to send
1120 your mail in UTF-8, where $to, $subject and $text have these values:
1121
1122 · To: "Ramón Nuñez <foo@bar.com>"
1123
1124 · Subject: "¡Aquí está!"
1125
1126 · Text: "¿Quieres ganar muchos €'s?"
1127
1128 use MIME::Lite;
1129 use Encode qw(encode encode_utf8 );
1130
1131 my $to = "Ram\363n Nu\361ez <foo\@bar.com>";
1132 my $subject = "\241Aqu\355 est\341!";
1133 my $text = "\277Quieres ganar muchos \x{20ac}'s?";
1134
1135 ### Create a new message encoded in UTF-8:
1136 my $msg = MIME::Lite->new(
1137 From => 'me@myhost.com',
1138 To => encode( 'MIME-Header', $to ),
1139 Subject => encode( 'MIME-Header', $subject ),
1140 Data => encode_utf8($text)
1141 );
1142 $msg->attr( 'content-type' => 'text/plain; charset=utf-8' );
1143 $msg->send;
1144
1145 Note:
1146
1147 · The above example assumes that the values you want to encode are in
1148 Perl's "internal" form, i.e. the strings contain decoded UTF-8
1149 characters, not the bytes that represent those characters.
1150
1151 See perlunitut, perluniintro, perlunifaq and Encode for more.
1152
1153 · If, for the body of the email, you want to use a character set
1154 other than UTF-8, then you should encode appropriately, and set the
1155 correct "content-type", eg:
1156
1157 ...
1158 Data => encode('iso-8859-15',$text)
1159 ...
1160
1161 $msg->attr( 'content-type' => 'text/plain; charset=iso-8859-15' );
1162
1163 · For the message headers, Encode::MIME::Header only support UTF-8,
1164 but most modern mail clients should be able to handle this. It is
1165 not a problem to have your headers in a different encoding from the
1166 message body.
1167
1168 Benign limitations
1169 This is "lite", after all...
1170
1171 · There's no parsing. Get MIME-tools if you need to parse MIME
1172 messages.
1173
1174 · MIME::Lite messages are currently not interchangeable with either
1175 Mail::Internet or MIME::Entity objects. This is a completely
1176 separate module.
1177
1178 · A content-length field is only inserted if the encoding is binary,
1179 the message is a singlepart, and all the document data is available
1180 at "build()" time by virtue of residing in a simple path, or in-
1181 core. Since content-length is not a standard MIME field anyway
1182 (that's right, kids: it's not in the MIME RFCs, it's an HTTP
1183 thing), this seems pretty fair.
1184
1185 · MIME::Lite alone cannot help you lose weight. You must supplement
1186 your use of MIME::Lite with a healthy diet and exercise.
1187
1188 Cheap and easy mailing
1189 I thought putting in a default "sendmail" invocation wasn't too bad an
1190 idea, since a lot of Perlers are on UNIX systems. (As of version 3.02
1191 this is default only on Non-Win32 boxen. On Win32 boxen the default is
1192 to use SMTP and the defaults specified in the site/lib/Net/libnet.cfg)
1193
1194 The out-of-the-box configuration is:
1195
1196 MIME::Lite->send('sendmail', "/usr/lib/sendmail -t -oi -oem");
1197
1198 By the way, these arguments to sendmail are:
1199
1200 -t Scan message for To:, Cc:, Bcc:, etc.
1201
1202 -oi Do NOT treat a single "." on a line as a message terminator.
1203 As in, "-oi vey, it truncated my message... why?!"
1204
1205 -oem On error, mail back the message (I assume to the
1206 appropriate address, given in the header).
1207 When mail returns, circle is complete. Jai Guru Deva -oem.
1208
1209 Note that these are the same arguments you get if you configure to use
1210 the smarter, taint-safe mailing:
1211
1212 MIME::Lite->send('sendmail');
1213
1214 If you get "X-Authentication-Warning" headers from this, you can forgo
1215 diddling with the envelope by instead specifying:
1216
1217 MIME::Lite->send('sendmail', SetSender=>0);
1218
1219 And, if you're not on a Unix system, or if you'd just rather send mail
1220 some other way, there's always SMTP, which these days probably requires
1221 authentication so you probably need to say
1222
1223 MIME::Lite->send('smtp', "smtp.myisp.net",
1224 AuthUser=>"YourName",AuthPass=>"YourPass" );
1225
1226 Or you can set up your own subroutine to call. In any case, check out
1227 the send() method.
1228
1230 Good-vs-bad email addresses with send_by_smtp()
1231 If using send_by_smtp(), be aware that unless you explicitly provide
1232 the email addresses to send to and from you will be forcing MIME::Lite
1233 to extract email addresses out of a possible list provided in the
1234 "To:", "Cc:", and "Bcc:" fields. This is tricky stuff, and as such
1235 only the following sorts of addresses will work reliably:
1236
1237 username
1238 full.name@some.host.com
1239 "Name, Full" <full.name@some.host.com>
1240
1241 Disclaimer: MIME::Lite was never intended to be a Mail User Agent, so
1242 please don't expect a full implementation of RFC-822. Restrict
1243 yourself to the common forms of Internet addresses described herein,
1244 and you should be fine. If this is not feasible, then consider using
1245 MIME::Lite to prepare your message only, and using Net::SMTP explicitly
1246 to send your message.
1247
1248 Note: As of MIME::Lite v3.02 the mail name extraction routines have
1249 been beefed up considerably. Furthermore if Mail::Address if provided
1250 then name extraction is done using that. Accordingly the above advice
1251 is now less true than it once was. Funky email names should work
1252 properly now. However the disclaimer remains. Patches welcome. :-)
1253
1254 Formatting of headers delayed until print()
1255 This class treats a MIME header in the most abstract sense, as being a
1256 collection of high-level attributes. The actual RFC-822-style header
1257 fields are not constructed until it's time to actually print the darn
1258 thing.
1259
1260 Encoding of data delayed until print()
1261 When you specify message bodies (in build() or attach()) -- whether by
1262 FH, Data, or Path -- be warned that we don't attempt to open files,
1263 read filehandles, or encode the data until print() is invoked.
1264
1265 In the past, this created some confusion for users of sendmail who gave
1266 the wrong path to an attachment body, since enough of the print() would
1267 succeed to get the initial part of the message out. Nowadays,
1268 $AUTO_VERIFY is used to spot-check the Paths given before the mail
1269 facility is employed. A whisker slower, but tons safer.
1270
1271 Note that if you give a message body via FH, and try to print() a
1272 message twice, the second print() will not do the right thing unless
1273 you explicitly rewind the filehandle.
1274
1275 You can get past these difficulties by using the ReadNow option,
1276 provided that you have enough memory to handle your messages.
1277
1278 MIME attributes are separate from header fields!
1279 Important: the MIME attributes are stored and manipulated separately
1280 from the message header fields; when it comes time to print the header
1281 out, any explicitly-given header fields override the ones that would be
1282 created from the MIME attributes. That means that this:
1283
1284 ### DANGER ### DANGER ### DANGER ### DANGER ### DANGER ###
1285 $msg->add("Content-type", "text/html; charset=US-ASCII");
1286
1287 will set the exact "Content-type" field in the header I write,
1288 regardless of what the actual MIME attributes are.
1289
1290 This feature is for experienced users only, as an escape hatch in case
1291 the code that normally formats MIME header fields isn't doing what you
1292 need. And, like any escape hatch, it's got an alarm on it: MIME::Lite
1293 will warn you if you attempt to "set()" or "replace()" any MIME header
1294 field. Use "attr()" instead.
1295
1296 Beware of lines consisting of a single dot
1297 Julian Haight noted that MIME::Lite allows you to compose messages with
1298 lines in the body consisting of a single ".". This is true: it should
1299 be completely harmless so long as "sendmail" is used with the -oi
1300 option (see "Cheap and easy mailing").
1301
1302 However, I don't know if using Net::SMTP to transfer such a message is
1303 equally safe. Feedback is welcomed.
1304
1305 My perspective: I don't want to magically diddle with a user's message
1306 unless absolutely positively necessary. Some users may want to send
1307 files with "." alone on a line; my well-meaning tinkering could
1308 seriously harm them.
1309
1310 Infinite loops may mean tainted data!
1311 Stefan Sautter noticed a bug in 2.106 where a m//gc match was failing
1312 due to tainted data, leading to an infinite loop inside MIME::Lite.
1313
1314 I am attempting to correct for this, but be advised that my fix will
1315 silently untaint the data (given the context in which the problem
1316 occurs, this should be benign: I've labelled the source code with
1317 UNTAINT comments for the curious).
1318
1319 So: don't depend on taint-checking to save you from outputting tainted
1320 data in a message.
1321
1322 Don't tweak the global configuration
1323 Global configuration variables are bad, and should go away. Until they
1324 do, please follow the hints with each setting on how not to change it.
1325
1327 Content types
1328 The "Type" parameter of "build()" is a content type. This is the
1329 actual type of data you are sending. Generally this is a string of the
1330 form "majortype/minortype".
1331
1332 Here are the major MIME types. A more-comprehensive listing may be
1333 found in RFC-2046.
1334
1335 application
1336 Data which does not fit in any of the other categories,
1337 particularly data to be processed by some type of application
1338 program. "application/octet-stream", "application/gzip",
1339 "application/postscript"...
1340
1341 audio
1342 Audio data. "audio/basic"...
1343
1344 image
1345 Graphics data. "image/gif", "image/jpeg"...
1346
1347 message
1348 A message, usually another mail or MIME message.
1349 "message/rfc822"...
1350
1351 multipart
1352 A message containing other messages. "multipart/mixed",
1353 "multipart/alternative"...
1354
1355 text
1356 Textual data, meant for humans to read. "text/plain",
1357 "text/html"...
1358
1359 video
1360 Video or video+audio data. "video/mpeg"...
1361
1362 Content transfer encodings
1363 The "Encoding" parameter of "build()". This is how the message body is
1364 packaged up for safe transit.
1365
1366 Here are the 5 major MIME encodings. A more-comprehensive listing may
1367 be found in RFC-2045.
1368
1369 7bit
1370 Basically, no real encoding is done. However, this label
1371 guarantees that no 8-bit characters are present, and that lines do
1372 not exceed 1000 characters in length.
1373
1374 8bit
1375 Basically, no real encoding is done. The message might contain
1376 8-bit characters, but this encoding guarantees that lines do not
1377 exceed 1000 characters in length.
1378
1379 binary
1380 No encoding is done at all. Message might contain 8-bit
1381 characters, and lines might be longer than 1000 characters long.
1382
1383 The most liberal, and the least likely to get through mail
1384 gateways. Use sparingly, or (better yet) not at all.
1385
1386 base64
1387 Like "uuencode", but very well-defined. This is how you should
1388 send essentially binary information (tar files, GIFs, JPEGs, etc.).
1389
1390 quoted-printable
1391 Useful for encoding messages which are textual in nature, yet which
1392 contain non-ASCII characters (e.g., Latin-1, Latin-2, or any other
1393 8-bit alphabet).
1394
1396 MIME::Lite works nicely with other certain other modules if they are
1397 present. Good to have installed are the latest MIME::Types,
1398 Mail::Address, MIME::Base64, MIME::QuotedPrint, and Net::SMTP.
1399 Email::Date::Format is strictly required.
1400
1401 If they aren't present then some functionality won't work, and other
1402 features wont be as efficient or up to date as they could be.
1403 Nevertheless they are optional extras.
1404
1406 MIME::Lite comes with a number of extra files in the distribution
1407 bundle. This includes examples, and utility modules that you can use
1408 to get yourself started with the module.
1409
1410 The ./examples directory contains a number of snippets in prepared
1411 form, generally they are documented, but they should be easy to
1412 understand.
1413
1414 The ./contrib directory contains a companion/tool modules that come
1415 bundled with MIME::Lite, they don't get installed by default. Please
1416 review the POD they come with.
1417
1419 The whole reason that version 3.0 was released was to ensure that
1420 MIME::Lite is up to date and patched. If you find an issue please
1421 report it.
1422
1423 As far as I know MIME::Lite doesn't currently have any serious bugs,
1424 but my usage is hardly comprehensive.
1425
1426 Having said that there are a number of open issues for me, mostly
1427 caused by the progress in the community as whole since Eryq last
1428 released. The tests are based around an interesting but non standard
1429 test framework. I'd like to change it over to using Test::More.
1430
1431 Should tests fail please review the ./testout directory, and in any bug
1432 reports please include the output of the relevant file. This is the
1433 only redeeming feature of not using Test::More that I can see.
1434
1435 Bug fixes / Patches / Contribution are welcome, however I probably
1436 won't apply them unless they also have an associated test. This means
1437 that if I don't have the time to write the test the patch wont get
1438 applied, so please, include tests for any patches you provide.
1439
1441 Version: 3.031
1442
1444 Moved to ./changes.pod
1445
1446 NOTE: Users of the "advanced features" of 3.01_0x smtp sending should
1447 take care: These features have been REMOVED as they never really fit
1448 the purpose of the module. Redundant SMTP delivery is a task that
1449 should be handled by another module.
1450
1452 Copyright (c) 1997 by Eryq.
1453 Copyright (c) 1998 by ZeeGee Software Inc.
1454 Copyright (c) 2003,2005 Yves Orton. (demerphq)
1455
1456 All rights reserved. This program is free software; you can
1457 redistribute it and/or modify it under the same terms as Perl itself.
1458
1459 This software comes with NO WARRANTY of any kind. See the COPYING file
1460 in the distribution for details.
1461
1463 For some reason, the US FDA says that this is now required by law on
1464 any products that bear the name "Lite"...
1465
1466 Version 3.0 is now new and improved! The distribution is now 30%
1467 smaller!
1468
1469 MIME::Lite |
1470 ------------------------------------------------------------
1471 Serving size: | 1 module
1472 Servings per container: | 1
1473 Calories: | 0
1474 Fat: | 0g
1475 Saturated Fat: | 0g
1476
1477 Warning: for consumption by hardware only! May produce indigestion in
1478 humans if taken internally.
1479
1481 Eryq (eryq@zeegee.com). President, ZeeGee Software Inc.
1482 (http://www.zeegee.com).
1483
1484 Go to http://www.cpan.org for the latest downloads and on-line
1485 documentation for this module. Enjoy.
1486
1487 Patches And Maintenance by Yves Orton and many others. Consult
1488 ./changes.pod
1489
1490
1491
1492perl v5.30.1 2020-01-30 MIME::Lite(3)