in reply to Single variable Multiple Values

If I understand your problem correctly, you could apply this quick patch:
... my $mime_type = 'multipart/mixed'; my $mail_server = 'mail.test.com'; #--old: my $to = $emailverify; my $to = alias_to_emailaddress( $emailverify ); ...
And then add something to resolve the name/alias to an email-address:
sub alias_to_emailaddress { my ($alias) = @_; #-- e.g. "Bob"; #-- query your DB or start with a hash-lookup for testing... my %alias2email = ( 'BOB' => 'some@email.com', 'TIM' => 'test@cork.com', ); #-- maybe normalise your alias first? my $email = $alias2email{ uc $alias }; #---- now add some error handling... #-- perlhaps you can use a default? # $email //= 'bugreport2self@myhost.com'; #-- throw an exception (catch with 'eval' later) # die "No email-address found for '$alias'!" unless $email; return $email; }
(untested)

Replies are listed 'Best First'.
Re^2: Single variable Multiple Values
by PilotinControl (Pilgrim) on Jun 30, 2013 at 22:25 UTC

    That worked! Thanks!