Subject: Mail::Cclient problems

From: Brian Rossmajer <[email-masked]>
Date: Thu, 18 Nov 1999 11:42:38 -0500 (EST)

$body->disposition? I don't even see 
that in the documentation anywhere...
I pull it out of the body tag for each subpart:

 if ($body->type eq "MULTIPART") {
 my $num=0;
 foreach(@{$body->nested}) {
 next unless $num++; # skip the first one
 my ($text,$name,$type,$url)=("","","","");
 $type=lc($_->type).'/'.lc($_->subtype);
 
 ...

Brian
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Raul Dias <[email-masked]>
Date: Thu, 18 Nov 1999 17:19:34 -0200

>that in the documentation anywhere...

Yes,  that's the point.

AFAIK it isn't on the Perl's module.  But it is on the C API.

I am trying to implement that myself, but I am still learning the
XSUB interface to do that.

>I pull it out of the body tag for each subpart:

ok, but how do you get the filename from a aplication/octet-stream type?

> $type=lc($_->type).'/'.lc($_->subtype);

-Raul Dias

---

From: Brian Rossmajer <[email-masked]>
Date: Thu, 18 Nov 1999 18:41:43 -0500 (EST)

> AFAIK it isn't on the Perl's module. But it is on the C API.

I think the type and subtype were deliberately 
separated; the information is all still there.

> ok, but how do you get the filename from a aplication/octet-stream type?

The body object (of the nested body) has a parameters 
array that you can treat like a hash:

foreach(@{$body->nested}) { (same for loop as before)
 ...
 if ($_->parameter) 
 {
 my %mimevals=@{$_->parameter};
 foreach(keys %mimevals) 
 {
 print ucfirst(lc($_)).":$mimevals{$_}\n";
 if ($_ eq "NAME") 
 {
 $name=$mimevals{$_};
 }
 }
 }

I think you'll find most of what you're looking for in there!

Brian Rossmajer

---

From: Raul Dias <[email-masked]>
Date: Fri, 19 Nov 1999 12:01:41 -0200

>array that you can treat like a hash:

[...]

>I think you'll find most of what you're looking for in there!

Yes,

That's it. :-)
Now my application is almost complete.

Is there any other patch to Mail::Cclient that you are aware of?

Best Regards,

Raul Dias