Skip Menu |

This queue is for tickets about the Mail-IMAPClient CPAN distribution.

Report information
The Basics
Id: 2758
Status: resolved
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: DJKERNEN__NO_SOLICITING__ [...] cpan.org
Requestors: taralee [...] alum.mit.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Date: Mon, 9 Jun 2003 03:08:52 -0400
From: Tara L Andrews <taralee [...] alum.mit.edu>
To: bug-Mail-IMAPClient [...] rt.cpan.org
Subject: IMAPClient.pm patch for use with imtest
Hi, I just finished writing a script that uses your module to talk to an IMAP server, but uses the imtest command to do the actual connection and (Kerberos4) authentication to the server. As far as I can tell, since imtest is meant to be used interactively, it adds its own \r whenever it encounters a newline, before sending the line to the server. This means that the \r sent by IMAPClient confuses the server. I made a change so that I could use IMAPClient with imtest; I just use the Strip_cr() method inside the _send_line method, if an instance variable is set. I'm attaching a patch, although since I didn't look very hard at the rest of the module it might not be sufficient. The ability to suppress the \r would be very useful to have in a released version though. Thanks! -tara

Message body is not shown because sender requested not to inline it.

I would like to say that imtest isn't necessary because Mail::IMAPClient supports all manner of encryption, but that would be a lie. I hope to support encryption some day but in the mean time imtest is a great idea. I wish I had thought of it. I did some testing myself and found that the patch provided with this ticket isn't necessary, since the same thing can be accomplished by the following: $imap->Prewritemethod(\&Mail::IMAPClient::Strip_cr); However I am enamoured with the idea of using imtest so I am going to add a new example to the distribution so others can do the same. Cheers, Dave K.