I am using the Mail::IMAPClient module and the extension BodyStructure to
connect to Exchange Server 5.5. Everything seems to be working great ( I
love this module ) except for one thing. When I use the BodyStructure
extension, either nothing is being returned in the object or I don't know
how to access it. I can log on to server, query the mailbox and all it's
folders without any trouble but I can't seem to get a message bodystructure.
The docs show one example but I can't seem to get it to work for me. Here's
a snippet of code:
#####################################################
use CGI;
use Mail::IMAPClient;
use Mail::IMAPClient::BodyStructure;

$imapp = Mail::IMAPClient->new (
Server =>
$servername,
User =>
$username,
Password =>
$password,
Uid => 1,
Debug => 1
);
$imapp->select($foldername);
my $struct =
Mail::IMAPClient::BodyStructure->new($imapp->fetch($msguid,"bodystructure"))
;
$btype = $struct->bodytype;
$bsubtype = $struct->bodysubtype;

#####################################################

When the code is run, I don't get any errors but I don't get the
bodystructure either. I have tried this many different ways but none seem
to work. Having turned on the debug option, I can see that the request is
sent to the server and the server does respond:

3 UID FETCH 12 bodystructure

Sent 30 bytes
Read: * 2 FETCH (BODYSTRUCTURE ("TEXT" "PLAIN" ("CHARSET" "US-ASCII") NIL
NIL "7BIT" 489 9 NIL NIL NIL) UID 12)
3 OK FETCH completed

If I print $struct, I get the following though the =HASH(...) part varies:
Mail::IMAPClinet::BodyStructure=HASH(0x87d6b64)

If anyone has any ideas, please let me know. Any help would be greatly
appreciated.

Thanks,
Chris



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to