Skip Menu |

This queue is for tickets about the MIME-Lite-HTML CPAN distribution.

Report information
The Basics
Id: 24889
Status: resolved
Priority: 0/
Queue: MIME-Lite-HTML

People
Owner: Nobody in particular
Requestors: KevinAMcGrail-CPAN [...] mcgrail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.22
Fixed in: 1.18



MIME::Lite::HTML bombs on build_mime_object if the txt & html message are both blank. From a high-level review, this seems to be a change in the case statements for v 1.22. In version 1.18, for example, there was a final else without any case checks in build_mime_object. version 1.22 adds a elsif ($txt && @$ref_mail) { So if you send in a blank txt and html message, no $mail object is created and because the object doesn't exist: $mail->replace('X-Mailer',"MIME::Lite::HTML $VERSION"), fails with the following error: "Can't call method "replace" on an undefined value at /usr/local/lib/perl5/site_perl/5.8.0/MIME/Lite/HTML.pm line 475." To fix, perhaps an if defined check or a new else statement? It is theoretically "legit" to send a blank email so I don't think erroring that the message is blank is "ok".