Overview
Features
Download
Documentation
Community
Add-Ons & Services

Sending e-mail over SMTP with send progress info

Please post support and help requests here.

Sending e-mail over SMTP with send progress info

Postby DeveloperDD » 30 Nov 2012, 18:00

I'm a beginner in using the POCO library and I want to send an e-mail over a given SMTP server. The mail samples in the Net and NetSSL_OpenSSL library are very useful, so I could successful implement the desired functionality with the classes Poco::Net::SMTPClientSession, Poco::Net::SecureSMTPClientSession and the method Poco::Net::SMTPClientSession::sendMessage().

Now, I would additional implement the following functionalities:

1) Inform the user about the send mail progress. The user should see how many bytes have been currently sent and the total of bytes that will be sent. So, for that purpose I need an appropriate event, that I can handle for the GUI.

2) Cancel the send mail operation. The user should have the possibility to cancel the mail sending.

How can I realize the above functionalities?

I would be grateful for your help. Thanks in advance.
DeveloperDD
 
Posts: 1
Joined: 30 Nov 2012, 17:02
Location: Germany

Re: Sending e-mail over SMTP with send progress info

Postby alex » 30 Nov 2012, 18:35

There is no way to currently do that without modifying the library. Recently, I've done some work on the Mail package features and part of that change is this function:
Code: Select all
void SMTPClientSession::sendMessage(std::istream& istr)

With that available, you could wrap the istream with CountingInputStream.
I can not, however, provide a timeframe when that will be released. You can find the code here.
alex
 
Posts: 1132
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Sending e-mail over SMTP with send progress info

Postby mjx » 01 May 2013, 17:45

Hi.

I have the same problem, i need to display some progress when receiving and sending mails. Is it possible now? I checked the docs for the current development version 1.5.1, but i didn't find any new methods for this. I saw a new class "SMTPLogger", but i couldn't find out whats its purpose is.

The link alex gave is dead now.

I think this is an essential function.
mjx
 
Posts: 1
Joined: 01 May 2013, 17:27


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests