E
ecureuil
hi,
Before, I use perl-Net-SMTP-Multipart-1.5-1
I modified Multipart.pm for this version :
http://rt.cpan.org/Public/Bug/Display.html?id=17936 for filename
# Keep only basename
$filename = $file;
$filename =~ s/^.*\/(.*?)/$1/;
and I add :
$self->datasend("From: ($arg{From})\n");
Now, I try with Net-SMTP-Multipart-1.5.4
I have problem with filename and From.
I modified 'From' as with version 1.5.1. It's ok.
But for filename ( FileAttach ), I have a problem.
sub FileAttach {
my $self = shift;
foreach my $file (@_) {
my $displayname;
if (ref($file) eq 'ARRAY') {
$displayname = $file->[0];
$file = $file->[1];
} else {
$displayname = $file;
}
....
Could you explain me what these lines mean?
if (ref($file) eq 'ARRAY') { # ref and ARRAY ?
$displayname = $file->[0]; # $file->[0] ?
$file = $file->[1]; # $file->[1] ?
Thank you
anne
Before, I use perl-Net-SMTP-Multipart-1.5-1
I modified Multipart.pm for this version :
http://rt.cpan.org/Public/Bug/Display.html?id=17936 for filename
# Keep only basename
$filename = $file;
$filename =~ s/^.*\/(.*?)/$1/;
and I add :
$self->datasend("From: ($arg{From})\n");
Now, I try with Net-SMTP-Multipart-1.5.4
I have problem with filename and From.
I modified 'From' as with version 1.5.1. It's ok.
But for filename ( FileAttach ), I have a problem.
sub FileAttach {
my $self = shift;
foreach my $file (@_) {
my $displayname;
if (ref($file) eq 'ARRAY') {
$displayname = $file->[0];
$file = $file->[1];
} else {
$displayname = $file;
}
....
Could you explain me what these lines mean?
if (ref($file) eq 'ARRAY') { # ref and ARRAY ?
$displayname = $file->[0]; # $file->[0] ?
$file = $file->[1]; # $file->[1] ?
Thank you
anne