From 8d20c8de3a6e520232ce7cd73b65360cee31ff62 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Mon, 30 May 2005 15:19:47 +0000 Subject: [PATCH] Don't ask for authentication credentials when specified in the URL. --- examples/example6.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/example6.cpp b/examples/example6.cpp index aab3245e..349238d9 100644 --- a/examples/example6.cpp +++ b/examples/example6.cpp @@ -315,7 +315,9 @@ static void connectStore() interactiveAuthenticator auth; vmime::utility::auto_ptr st = - g_session->getStore(url, &auth); + g_session->getStore(url, + (url.getUsername().empty() || url.getPassword().empty()) + ? &auth : NULL); // Connect to the mail store st->connect();