You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdepim/kmailcvt
toma 460c52653a
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
15 years ago
..
pics Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
samples Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
Makefile.am Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
README Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
cr16-app-kmailcvt.png Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
cr32-app-kmailcvt.png Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
cr48-app-kmailcvt.png Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_evolution.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_evolution.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_evolution_v2.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_evolution_v2.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_kmail_maildir.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_kmail_maildir.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_lnotes.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_lnotes.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_mailapp.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_mailapp.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_mbox.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_mbox.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_oe.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_oe.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_opera.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_opera.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_outlook.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_outlook.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_plain.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_plain.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_pmail.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_pmail.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_sylpheed.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_sylpheed.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_thebat.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_thebat.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_thunderbird.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filter_thunderbird.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filters.cxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
filters.hxx Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
kimportpage.cpp Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
kimportpage.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
kimportpagedlg.ui Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
kmailcvt.cpp Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
kmailcvt.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
kselfilterpage.cpp Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
kselfilterpage.h Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
kselfilterpagedlg.ui Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
main.cpp Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago
uninstall.desktop Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. 15 years ago

README

The KDE Mail Import tool - KMailCVT
===================================

This directory contains the sources for the kmailcvt program. It communicates
with KMail via its DCOP interface to add messages.

Writing a filter
----------------

...is very easy. Create two files filter_myformat.cxx and filter_myformat.hxx
and add "filter_myformat.cxx" to the end of the kmailcvt_SOURCES line in
Makefile.am and "filter_myformat.cxx filter_myformat.hxx" to the end of the
EXTRA_DIST line in Makefile.am. Now run "make -f Makefile.cvs; ./configure" in
your kdepim source directory.

In the import method of your filter you are passed a FilterInfo object. This has
the following methods that you may want to use:

    void setFrom( const QString& from ); // Set to file importing from
    void setTo( const QString& to ); // Set to folder importing into
    void setCurrent( const QString& current ); // What we are doing
    void setCurrent( int percent = 0 ); // Set percentage of current file
    void setOverall( int percent = 0 ); // Set overall percentage
    void addLog( const QString& log ); // Add a message for the user to see
    void alert( const QString& message ); // Tell user something has gone wrong
    QWidget *parent(); // The parent widget
    
    bool removeDupMsg; // true, if user selected 'remove duplicated messages'
    
Also, every now and again you should check to see if the shouldTerminate method
returns true, if it does the user has pressed cancel and your import method
should return.

To add messages, extract the email (including all headers) into a KTempFile.
Then use the following:

if(info->removeDupMsg) addMessage( info, folderName, tempfilepath );
else addMessage_fastImport( info, folderName, tempfilepath );

For a simple example, look at filter_plain

Finally for the filter to appear in the combo box in the wizard you need to edit
kselfilterpage.cpp and add an appropriate addFilter() function call.

Danny Kukawka, February 2005
Laurence Anderson, April 2003.