Trying to use wxEMail to delete message(s) Topic is solved
Trying to use wxEMail to delete message(s)
While using wxEMail, I have tried to figure out how to delete one or several e-mail messages, but have not had much luck.
Anyone have any pointers for this?
Is wxEMail even set up for this?
I have found something about suppressing messages, but don't see how to use it, if that is the mechanism to use.
TIA
Arnold
Anyone have any pointers for this?
Is wxEMail even set up for this?
I have found something about suppressing messages, but don't see how to use it, if that is the mechanism to use.
TIA
Arnold
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
- evstevemd
- Part Of The Furniture
- Posts: 2409
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
Re: Trying to use wxEMail to delete message(s)
I have no idea but briceandre once talked about maintaining it. Am not sure he still does. Try to contact him
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Re: Trying to use wxEMail to delete message(s)
Thank you for the interest.evstevemd wrote:I have no idea but briceandre once talked about maintaining it. Am not sure he still does. Try to contact him
The project seemed to be dead for so long, I thought it unlikely to be worth the trouble.
It certainly seems to have fallen by the wayside with no work or changes for years.
Then again, why not?
I'll give it a try
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
Re: Trying to use wxEMail to delete message(s)
If you want to do anything serious related to email sending / receiving / processing i highly recommend this library:
http://www.chilkatsoft.com/email-features.asp
It's not free, but at a one-time-fee of 99 USD without royalties, it'll save you a lot of time and trouble.
Even if this sounds like advertisement, i'm not affiliated with them, just a happy customer
http://www.chilkatsoft.com/email-features.asp
It's not free, but at a one-time-fee of 99 USD without royalties, it'll save you a lot of time and trouble.
Even if this sounds like advertisement, i'm not affiliated with them, just a happy customer
Use the source, Luke!
Re: Trying to use wxEMail to delete message(s)
Thank you, Doblemax,doublemax wrote:If you want to do anything serious related to email sending / receiving / processing i highly recommend this library:
http://www.chilkatsoft.com/email-features.asp
It is just for "in house" for now - and possible freeware eventually, so I guess I am not that serious
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
- evstevemd
- Part Of The Furniture
- Posts: 2409
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
Re: Trying to use wxEMail to delete message(s)
I have never tried but libcurl is another choice worth of looking at
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Re: Trying to use wxEMail to delete message(s)
It certainly looks like it might be a good alternative, especially as I would like to use threads so any operation can be terminated before it finishes.evstevemd wrote:I have never tried but libcurl is another choice worth of looking at
As it happens, I have used libcurl in other projects, but only after fighting with wxEMail (and a reply from Andre Brice confirms that I am using the latest version he will be unable to further maintenance) and your comment that I had a more serious look at libcurl.
And it looks like libcurl might be able to do what I need without my getting too deep into reworking it, as it looks like I would have to do with wxEMail so thank you for the nudge in the right direction
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
Re: Trying to use wxEMail to delete message(s)
Guess I spoke too soon.
Just spent a whole lot of time with libcurl, including downloading and compiling the latest version, without getting anywhere with POP3 commands.
I've tried the command line, compiled their own samples in C - never mind my efforts on using POP 3 commands in code which works well with HTTP commands.
No luck at all - very disappointing
Just spent a whole lot of time with libcurl, including downloading and compiling the latest version, without getting anywhere with POP3 commands.
I've tried the command line, compiled their own samples in C - never mind my efforts on using POP 3 commands in code which works well with HTTP commands.
No luck at all - very disappointing
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
- evstevemd
- Part Of The Furniture
- Posts: 2409
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
Re: Trying to use wxEMail to delete message(s)
Can you post a minimal code with what you want to accomplish?
Do you get any error? Please add useful information. Sorry for the disappointment but they are part and parcel of programming
Do you get any error? Please add useful information. Sorry for the disappointment but they are part and parcel of programming
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Re: Trying to use wxEMail to delete message(s)
And so is misleading hypeevstevemd wrote:Can you post a minimal code with what you want to accomplish?
Do you get any error? Please add useful information. Sorry for the disappointment but they are part and parcel of programming
Simply put, I would like top use libcurl to handle e-mail.
The simplest sample that I can give you and the one I tried, is one of those given on the libcurl example page: http://curl.haxx.se/libcurl/c/pop3-list.html
It may or may not be my pop3 server, but it simply refuses to even do that much.
Using Wireshark shows that the basic sample does nothing but issue a CAPA request and does not even try to log in, let alone issue a LIST (or any other) request.
I have given up on libcurl, but I thought I should answer your question.
As of yet I have not received any reply to my question on the libcurl mail list and yes, I am using the latest and greatest version of libcurl 7.45 and I have scoured the 'net for some _working_ sample code.
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
- evstevemd
- Part Of The Furniture
- Posts: 2409
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
Re: Trying to use wxEMail to delete message(s)
Do you have test credentials?
I would like to test for you that sample and hopefully fix something
I would like to test for you that sample and hopefully fix something
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
Re: Trying to use wxEMail to delete message(s)
http://curl.haxx.se/libcurl/c/pop3-list.html
That sample code looks incomplete. At the very least you will need a write callback where you actually receive the data.
http://curl.haxx.se/libcurl/c/CURLOPT_W ... CTION.html
That sample code looks incomplete. At the very least you will need a write callback where you actually receive the data.
http://curl.haxx.se/libcurl/c/CURLOPT_W ... CTION.html
Use the source, Luke!
Re: Trying to use wxEMail to delete message(s)
Not sure what you mean. What sort of credentials are you looking for?evstevemd wrote:Do you have test credentials?
Just download the code from the link I posted and compile it.evstevemd wrote:I would like to test for you that sample and hopefully fix something
Let me know if it works for you
If it does, then we can try to sort out why it won't for me.
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
Re: Trying to use wxEMail to delete message(s)
At one point I did, though after looking at the 'stuff' sent on the wire by the sample, I gave up on it altogether.doublemax wrote:http://curl.haxx.se/libcurl/c/pop3-list.html
That sample code looks incomplete. At the very least you will need a write callback where you actually receive the data.
http://curl.haxx.se/libcurl/c/CURLOPT_W ... CTION.html
I don't feel like debugging their code for them, though I did compile with debugging enabled and tried for a bit.
It did not even try to connect with the credentials I supplied and I verified as much with Wireshark for both the example and curl.exe (as compiled by the libcurl package).
Environment: Win 10/11 64-bit & Mint 21.1
MSVC Express 2019/2022
wxWidgets 3.2.2
MSVC Express 2019/2022
wxWidgets 3.2.2
Re: Trying to use wxEMail to delete message(s)
The following code worked for me. For simplicity i put the receiving code into the OnAbout() method of the minimal sample.
Also be aware that many email providers don't allow unencrypted transfers any more. You need to connect through SSL/TLS for them.
Code: Select all
static int write_callback(void *buffer, size_t size, size_t nmemb, void *userdata)
{
wxLogDebug("write_callback %ld", size*nmemb);
wxString s((const char *)buffer, wxConvUTF8, size*nmemb);
wxLogDebug(s);
return (size*nmemb);
};
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
char curl_error_buf[CURL_ERROR_SIZE];
CURL *curl = curl_easy_init();
CURLcode res;
if (curl == NULL)
return;
curl_easy_setopt(curl, CURLOPT_USERNAME, "username");
curl_easy_setopt(curl, CURLOPT_PASSWORD, "password");
/* This will list every message of the given mailbox */
curl_easy_setopt(curl, CURLOPT_URL, "pop3://pop3.strato.de");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback);
curl_easy_setopt(curl, CURLOPT_FILE, this);
curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, curl_error_buf);
//curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT_MS, 5000);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
res = curl_easy_perform(curl);
wxString error_msg(curl_error_buf, wxConvUTF8);
wxLogDebug("curl error: %s", error_msg);
curl_easy_cleanup(curl);
}
Use the source, Luke!