in reply to Re^5: Error in MIME::Lite?
in thread Error in MIME::Lite?

Aha! There's the issue:
% diff foo.pl bar.pl 7c7 < $msg->build(subject => 'a message subject')->data('Data2'); --- > $msg->build(subject => 'a message subject'); foo.pl -> 0 bar.pl -> 1
Why is the ->data() required?

Replies are listed 'Best First'.
Re^7: Error in MIME::Lite?
by Anonymous Monk on Jul 30, 2017 at 00:43 UTC

    Because its written that way?

    build returns an object of some kind ... if you dont specify data in constructor, you have to specify it later ...

    Notice also data1 is disappeared :)