summaryrefslogtreecommitdiff
path: root/fml/lib/Mail/Message/DB.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-06-14 06:55:03 +0000
committerfukachan <fukachan>2003-06-14 06:55:03 +0000
commit451a5570f4eb774dec7e29b675bbb47928a981be (patch)
treef9729766d2c1f28bd2478415c811fca2b463122f /fml/lib/Mail/Message/DB.pm
parent5c18bc485e95c2fd10af7f801a0a13dd6b69e4f3 (diff)
downloadfml8-451a5570f4eb774dec7e29b675bbb47928a981be.tar.gz
fml8-451a5570f4eb774dec7e29b675bbb47928a981be.tar.bz2
fml8-451a5570f4eb774dec7e29b675bbb47928a981be.zip
implement Mail::Message::Utils::from_to_name() and modified modules to
use it.
Diffstat (limited to 'fml/lib/Mail/Message/DB.pm')
-rw-r--r--fml/lib/Mail/Message/DB.pm23
1 files changed, 4 insertions, 19 deletions
diff --git a/fml/lib/Mail/Message/DB.pm b/fml/lib/Mail/Message/DB.pm
index 1e5c53a0..0780c504 100644
--- a/fml/lib/Mail/Message/DB.pm
+++ b/fml/lib/Mail/Message/DB.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: DB.pm,v 1.1.2.5 2003/06/04 13:37:22 fukachan Exp $
+# $FML: DB.pm,v 1.1.2.6 2003/06/14 05:39:03 fukachan Exp $
#
package Mail::Message::DB;
@@ -21,7 +21,7 @@ use lib qw(../../../../fml/lib
../../../../img/lib
);
-my $version = q$FML: DB.pm,v 1.1.2.5 2003/06/04 13:37:22 fukachan Exp $;
+my $version = q$FML: DB.pm,v 1.1.2.6 2003/06/14 05:39:03 fukachan Exp $;
if ($version =~ /,v\s+([\d\.]+)\s+/) { $version = $1;}
my $debug = 1;
@@ -568,24 +568,9 @@ sub _address_clean_up
sub _who_of_address
{
my ($self, $address) = @_;
- my ($user);
- use Mail::Address;
- my (@addrs) = Mail::Address->parse($address);
-
- for my $addr (@addrs) {
- if (defined( $addr->phrase() )) {
- my $phrase = $self->_decode_mime_string( $addr->phrase() );
-
- if ($phrase) {
- return($phrase);
- }
- }
-
- $user = $addr->user();
- }
-
- return( $user ? "$user\@xxx.xxx.xxx.xxx" : $address );
+ use Mail::Message::Utils;
+ return Mail::Message::Utils::from_to_name($address);
}