Trying to use wxEMail to delete message(s)  [SOLVED]

Talk here about issues with one of the components hosted at wxCode, or suggest features for it.
Widgets
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 246
Joined: Thu Jun 01, 2006 4:36 pm
Location: Right here!

Re: Trying to use wxEMail to delete message(s)

Postby Widgets » Tue Nov 17, 2015 8:30 pm

doublemax wrote:The following code worked for me. For simplicity i put the receiving code into the OnAbout() method of the minimal sample.

Thank you, doublemax for testing this example.

Using your code, I get no output at all.
Again, using wisreshark, I see the following conversation on the 'wire' - after substituting my credentials and pop server address.

Code: Select all

+OK POP3 ready
CAPA
+OK Capability list follows
EXPIRE 31 USER
TOP
UIDL
USER
XOIP
SASL GSSAPI
STLS
.
AUTH GSSAPI
+


Setting a breakpoint at the end of the code, it shows 'res = CURLE_LOGIN_DENIED' and no attempt to login using the given credentials.
Using these same credentials I can log in via telnet and get the expected responses.
"AUTH GSSAPI" is what the example sends to the pop server, and I suppose I could (and would have to) investigate what that implies, but as afar as I can tell, it is NOT pop3 'speak';

This result is exactly what I got before and going back to my old code, yours adds a few more details, such as

Code: Select all

curl_easy_setopt(curl, CURLOPT_FILE, this);

this one being the only one I would think important

Code: Select all

curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_error_buf);
//curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, 5000);
 curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);

PS: the write_callback never gets called.
doublemax wrote:Also be aware that many email providers don't allow unencrypted transfers any more. You need to connect through SSL/TLS for them.

Yes I am aware of this issue and the next part of my project is to investigate IMAP, which is the alternative my ISP offers.
Environment: Win 10 64-bit
MSVC Express 2010 & 2015
wxWidgets 3.1
Fight SPAM - report it with wxSR

scottfurry
Knows some wx things
Knows some wx things
Posts: 48
Joined: Mon May 28, 2007 1:51 pm
Location: Calgary, Alberta, Canada

Re: Trying to use wxEMail to delete message(s)

Postby scottfurry » Mon Nov 30, 2015 6:55 pm

VMime would be my first suggestion.
http://www.vmime.org/

From the About page
VMime is a powerful C++ class library for working with RFC-822 and MIME messages and Internet messaging services like IMAP, POP or SMTP.

With VMime you can parse, generate and modify messages, and also connect to store and transport services to receive or send messages over the Internet. The library offers all the features to build a complete mail client.

Widgets
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 246
Joined: Thu Jun 01, 2006 4:36 pm
Location: Right here!

Re: Trying to use wxEMail to delete message(s)

Postby Widgets » Mon Nov 30, 2015 8:07 pm

scottfurry wrote:VMime would be my first suggestion.
http://www.vmime.org/

Thank you, Scott.
I'll be sure to have good look.
Environment: Win 10 64-bit
MSVC Express 2010 & 2015
wxWidgets 3.1
Fight SPAM - report it with wxSR

scottfurry
Knows some wx things
Knows some wx things
Posts: 48
Joined: Mon May 28, 2007 1:51 pm
Location: Calgary, Alberta, Canada

Re: Trying to use wxEMail to delete message(s)

Postby scottfurry » Tue Dec 01, 2015 12:31 am

FYI,
I have been able to use this library to access google (IMAP).
It can be a little quirky to understand and the documentation (also a downloadable PDF) is not totally clear, but it works quite well.

PM if your interested examples.

Widgets
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 246
Joined: Thu Jun 01, 2006 4:36 pm
Location: Right here!

Re: Trying to use wxEMail to delete message(s)

Postby Widgets » Tue Dec 01, 2015 12:48 am

scottfurry wrote:FYI,
I have been able to use this library to access google (IMAP).
It can be a little quirky to understand and the documentation (also a downloadable PDF) is not totally clear, but it works quite well.

PM if your interested examples.

Thank you, Scott.
I have just downloaded the PDF, but have not had a chance to look it over.

Probably won't get a chance till late this week - am off fiddling with another project :-)

Once I get back to the project and get stuck, I'm sure to send you some PM
Environment: Win 10 64-bit
MSVC Express 2010 & 2015
wxWidgets 3.1
Fight SPAM - report it with wxSR

Widgets
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 246
Joined: Thu Jun 01, 2006 4:36 pm
Location: Right here!

Re: Trying to use wxEMail to delete message(s)

Postby Widgets » Wed Dec 02, 2015 9:32 pm

Hi Scott,
After looking at some of the documentation, I have a couple of questions.
As it would seem more helpful for the wxWidgets community, I'll ask them here rather than in a PM

From the manual and the source code I see no support for MSVC - my preferred environment.
Some very few and dated comments in the forum do refer to MSVC, but only to earlier versions.

My current environment is MSVC 2010 Express, though I could likely run a more recent version,
if necessary, which I understand provides shared_ptr, so I hopefully would not need the boost
library and if substantial footprint.

Any thoughts on or experience with MSVC versions

TIA
Arnold
Environment: Win 10 64-bit
MSVC Express 2010 & 2015
wxWidgets 3.1
Fight SPAM - report it with wxSR

scottfurry
Knows some wx things
Knows some wx things
Posts: 48
Joined: Mon May 28, 2007 1:51 pm
Location: Calgary, Alberta, Canada

Re: Trying to use wxEMail to delete message(s)

Postby scottfurry » Wed Dec 02, 2015 9:55 pm

Widgets wrote:From the manual and the source code I see no support for MSVC - my preferred environment.
Some very few and dated comments in the forum do refer to MSVC, but only to earlier versions.

My current environment is MSVC 2010 Express, though I could likely run a more recent version,
if necessary, which I understand provides shared_ptr, so I hopefully would not need the boost
library and if substantial footprint.

Any thoughts on or experience with MSVC versions


Personally, I do not use MSVC. I know that MSVC6 (and I'm dating myself here) was rather subpar when it came to standard C++. My understanding is that it has improved over time.

shared_ptr is part of the C++11 standard. You should be able to specify (GCC command) "-std=c++11" somewhere in the project settings - boost would then not be required. Looking through the test sample I had done earlier, I didn't need to compile with boost libraries.

I found a CMakeLists.txt file (CMake instructions to build VMIME) here. File mentions that...
# Smart pointers
#
# If a C++11-compliant compiler is available and supports std::shared_ptr<>,
# use the standard implementation. Else, use boost::shared_ptr<>.
# In any case, let the user override the choice with VMIME_SHARED_PTR_USE_CXX
# and VMIME_SHARED_PTR_USE_BOOST variables.
(Line 827)

I would suggest grabbing the code for example #6 (ex6.cpp) and compile that. You may need to set your project settings to include VMIME headers and library files, as well as C++ 11 standard specifier. Example 6 is a working program that runs you through connecting to a message store.


Return to “wxCode”

Who is online

Users browsing this forum: No registered users and 1 guest