So I have a customer that for reasons I cannot fathom used forward slashes in their user alias names (i.e. “jeff/lindborg”) – boggles the mind.
That said – I cannot figure out for the life of me how to “escape out” that forward slash when trying to log into the mailbox – it either doesn’t recognize the account or thinks “lindborg” in the example above is a folder.
Am I missing something silly? Or should I just come back to my client and tell him to fire their IT manager who thought this was a good naming convention?
Jeff, at least the username doesn't have leading or trailing SPACE chars...
I would recommend the following:
1) Make sure you're using the very latest version of Chilkat (v9.4.1)
2) Turn on verbose logging (VerboseLogging property = true) and also set KeepSessionLog = true.
3) After the failed method call to login, examine both the LastErrorText and SessionLog properties. You can post them here.
However: When VerboseLogging is ON, a password might be included in the LastErrorText or SessionLog. When VerboseLogging is OFF, you should never find a password in the LastErrorText. However, in the SessionLog I would still confirm that it's not there.
Feel free to post the LastErrorText and SessionLog here. Make sure to use "pre" tags to keep it readable..
ok - here's the log entry with a few lines removed - so obviously it's treating the "/" as a separator (not a surprise) and trying to access a non existent folder I suspect - is there a way to "shuttle in" the forward slash as an escape sequence or is this just something that's not expected to work? I'm curious since forward slashes in aliases for AD are allowed - seems like there must be a way to approach this. Tried doubling up the forward slash for fun but same error...
[Thread 015], [13/08/15 10:42:52], (warning) failed to login to user's mailbox via IMAP in ProcessMailbox on ConnectionMessageBackupFunctions.cs. Alias=slash/dude, error from IMAP client=ChilkatLog: SelectMailbox: DllDate: Jul 9 2013 ChilkatVersion: 126.96.36.199 Architecture: Little Endian; 32-bit Language: .NET 4.0 VerboseLogging: 1 mailbox: #Users/slash/dude/inbox selectMailboxInner: mailboxPath: #Users/slash/dude/inbox separatorChar: / Escaping quotes and backslashes in mailbox name... utf7EncodedMailboxPath: #Users/slash/dude/inbox ImapCmdSent: aaag SELECT "#Users/slash/dude/inbox" getCompleteResponse: rcvUntilMatchStringQP:
dbReceived0: startIdx: 0 dbReceived: aaag BAD Invalid Argument Found match string. ImapCmdResp: aaag BAD Invalid Argument --getCompleteResponse Failed to find OK line in response. --selectMailboxInner Failed to select/examine mailbox mailbox: #Users/slash/dude/inbox imapSelectResponse: aaag BAD Invalid Argument Failed.
[Thread 015], [13/08/15 10:42:52], Imap session log=
aaag SELECT "#Users/slash/dude/inbox"
aaag BAD Invalid Argument'