Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^4: Store Lotus Notes Email

by pointer2002 (Initiate)
on Feb 23, 2005 at 17:37 UTC ( #433784=note: print w/replies, xml ) Need Help??

in reply to Re^3: Store Lotus Notes Email
in thread Store Lotus Notes Email

You may use another way to save the attachments like this:
use constant RTELEM_TYPE_FILEATTACHMENT=>8; ... foreach $doc($alldocs) { .. ... if( $Document->HasEmbedded ) { print "hasembeded\n"; my $body = $Document->GetFirstItem('Body'); my $nav = $body->CreateNavigator; if( $nav->FindFirstElement(RTELEM_TYPE_FILEATTACHMENT) ) { do { my $att = $nav->GetElement; my $dir = "$oriDIR/$cpt"; mkdir $dir unless -d $dir; my $file = "$dir/" . $att->Source; $att->ExtractFile( $file ); print "$file extracted\n"; } while( $nav->FindNextElement ) ; } }
I picked up this code on another thread. Regards Johnny

Replies are listed 'Best First'.
Re^5: Store Lotus Notes Email
by thebigfatgeek (Initiate) on Jul 23, 2009 at 11:28 UTC
    I know this is going back a few years, but how would I use this, do I need to add it into the code supplied by buckaduck, or on its own? The code supplied by buckaduck works great, but only saves the first attachment in an email, and I would love to be able to get a fix for that. Thanks for any advice

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://433784]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2020-10-27 15:49 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (257 votes). Check out past polls.