in reply to Re^4: Error in MIME::Lite?
in thread Error in MIME::Lite?
You can't create a new empty object and add data to it.
Sure you can
#!/usr/bin/perl -- use strict; use warnings; use MIME::Lite; my $msg = MIME::Lite->new; ## no data $msg->build( qw/ to you from me Data Data1 /); ## data $msg->build( qw/ subject SUBJECT /)->data('Data2'); ## data $msg->attach( qw/ Data DATA3 /); ## data $msg->print; __END__ Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_150136405630120" MIME-Version: 1.0 Date: Sat, 29 Jul 2017 14:34:16 -0700 To: you From: me Date: Sat, 29 Jul 2017 14:34:16 -0700 Subject: SUBJECT X-Mailer: MIME::Lite 3.029 (F2.84; T2.04; A2.12; B3.14; Q3.13) This is a multi-part message in MIME format. --_----------=_150136405630120 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain Data2 --_----------=_150136405630120 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain DATA3 --_----------=_150136405630120--
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Error in MIME::Lite?
by littlelion (Novice) on Jul 30, 2017 at 00:37 UTC | |
by Anonymous Monk on Jul 30, 2017 at 00:43 UTC |