All pastes #18614 Raw Edit

Miscellany

public text v1 · immutable
#18614 ·published 2005-07-27 12:57 UTC
rendered paste body
sub printPartt()
{
  my $top = $_[0];
  my $ent;
  my $i = 0;

  my $main_header = $top->head->as_string;
  # if is one part message it shoudl be an text/plain
  if(!$top->is_multipart)
  {
    my $main_body   = $top->bodyhandle->as_string;
  }
  else
  {
    # go in foreach for all parts fo that message
    foreach $ent ($top->parts_DFS) {
    	if ($ent->bodyhandle) {
        # that part should be save on disk
    	  if(defined($ent->head->mime_attr("content-type.name"))){
    	    print "\n\n to disc:",$ent->head->mime_attr("content-type.name"),"\n\n";
        } else {
    	    print "\n\n not to disc \n\n";
        }
      }
    }
  }

}