Question

Why does Thunderbird always return immediately after sending mail through MAPI?

Other clients, like Outlook Express, returns only when the mail is sent or when the user was cancelled the request. But Thunderbird always return SUCCESS every time.

Somebody knows why or knows how to fix it?

Thanks in advance.

Was it helpful?

Solution

Not all email clients behave the same. The specific behavior does not need to comply (AFAIK) to any standard. My copy of Thunderbird, by the way, first sends the file, and I can see the "sent" progress line while it does so.

However, Microsoft Outlook may consider a mail as "sent" when it is placed into the "Outgoing" folder (I last checked in the beginning of the 2000s... so maybe has changed).

Depending on the actual requirements of your application, you may want to consider to log the message ID or handle when sending it, and then track it inside Thunderbird (programmatically) to locate whether it has moved into the "Sent" folder.

OTHER TIPS

Here is another try at your problem. The Activity Manager documented on Mozilla's Thunderbird API documentation webpage, is a new component available from version 3.

Among other things, it listens to events, and tells you when something has occured, and its progress. They have an example for sending mail.

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top