summaryrefslogtreecommitdiff
path: root/fml/lib/Mail/Message.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-01-09 03:46:23 +0000
committerfukachan <fukachan>2003-01-09 03:46:23 +0000
commit7a4049b1f42ae7e1f4f2fb5395a9c858419b9041 (patch)
tree5e48ad93b2f7a02c7a77ea5093633cbe133034d2 /fml/lib/Mail/Message.pm
parent4bc7b4acf3876c7f5f7ac9658b460b56dcacbb14 (diff)
downloadfml8-7a4049b1f42ae7e1f4f2fb5395a9c858419b9041.tar.gz
fml8-7a4049b1f42ae7e1f4f2fb5395a9c858419b9041.tar.bz2
fml8-7a4049b1f42ae7e1f4f2fb5395a9c858419b9041.zip
implemenet is_multipart() method
Diffstat (limited to 'fml/lib/Mail/Message.pm')
-rw-r--r--fml/lib/Mail/Message.pm22
1 files changed, 21 insertions, 1 deletions
diff --git a/fml/lib/Mail/Message.pm b/fml/lib/Mail/Message.pm
index 770d2756..deb33792 100644
--- a/fml/lib/Mail/Message.pm
+++ b/fml/lib/Mail/Message.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Message.pm,v 1.69 2002/12/30 15:06:46 fukachan Exp $
+# $FML: Message.pm,v 1.70 2003/01/09 00:43:57 fukachan Exp $
#
package Mail::Message;
@@ -1734,6 +1734,26 @@ sub is_empty
}
+=head2 is_multipart()
+
+return this message has empty content or not.
+
+=cut
+
+
+# Descriptions: return 1 if this message object is a multipart.
+# Arguments: OBJ($self)
+# Side Effects: none
+# Return Value: NUM( 1 or 0 )
+sub is_multipart
+{
+ my ($self) = @_;
+ my $type = $self->whole_message_header_data_type();
+
+ return( ($type =~ /multipart/i) ? 1 : 0 );
+}
+
+
=head2 encoding_mechanism()
return encoding type for specified Mail::Message not whole mail.