/[sap_import]/mail2sap.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /mail2sap.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10 by dpavlin, Mon Mar 24 13:02:30 2003 UTC revision 1.11 by dpavlin, Wed Apr 2 07:16:44 2003 UTC
# Line 44  sub dump_entity { Line 44  sub dump_entity {
44      if (@parts) {       # multipart...      if (@parts) {       # multipart...
45          map { dump_entity($_) } @parts;          map { dump_entity($_) } @parts;
46      } else {            # single part...      } else {            # single part...
47  #       print "    Part: ", $ent->bodyhandle->path,          print LOG scalar localtime," Att: ", $ent->bodyhandle->path, " (", scalar($ent->head->mime_type), ")\n";
48  #             " (", scalar($ent->head->mime_type), ")\n";          if ($ent->head->mime_type =~ m,text/plain,i && $ent->bodyhandle->path !~ m/(Orders|edi)/i) {
         if ($ent->head->mime_type =~ m,text/plain,i) {  
49  #               open(I,$ent->bodyhandle->path) || die "$ent->bodyhandle->path: $!";  #               open(I,$ent->bodyhandle->path) || die "$ent->bodyhandle->path: $!";
50  #               while(<I>) { print LOG $_; }  #               while(<I>) { print LOG $_; }
51  #               close(I);  #               close(I);
# Line 64  sub dump_entity { Line 63  sub dump_entity {
63                  $new .= $suffix;                  $new .= $suffix;
64    
65                  rename $file,"$outdir/$new" || die "move $file -> $outdir/$new: $!";                  rename $file,"$outdir/$new" || die "move $file -> $outdir/$new: $!";
                 my $prog = $0;  
                 $prog =~ s/^.*\/([^\/])+$/$1/g;  
                 print LOG scalar localtime," $prog $new\n";  
66    
67                  # now, call SAP rfc                  # now, call SAP rfc
68    
# Line 94  sub dump_entity { Line 90  sub dump_entity {
90    
91                  $it->FILENAME( $new );                  $it->FILENAME( $new );
92    
93                    print LOG scalar localtime," RFC: $new\n";
94                  $rfc->callrfc( $it );                  $rfc->callrfc( $it );
95    
96                  $rfc->close();                  $rfc->close();

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.26