summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-31 18:40:14 (UTC)
committer zautrix <zautrix>2004-10-31 18:40:14 (UTC)
commit16292c7f13b40a07b51b41c701cd106ccfd2f37b (patch) (side-by-side diff)
treef3e2dfe11b00f1d910eaeaafd28b0d97aa717ce1
parent043e2d256df36945779bf4568df46b6e4ae51e0e (diff)
downloadkdepimpi-16292c7f13b40a07b51b41c701cd106ccfd2f37b.zip
kdepimpi-16292c7f13b40a07b51b41c701cd106ccfd2f37b.tar.gz
kdepimpi-16292c7f13b40a07b51b41c701cd106ccfd2f37b.tar.bz2
hope it works..
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--desktop/rpm/kdepim_rpm2
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp6
-rw-r--r--version2
3 files changed, 5 insertions, 5 deletions
diff --git a/desktop/rpm/kdepim_rpm b/desktop/rpm/kdepim_rpm
index b663918..cead6bb 100644
--- a/desktop/rpm/kdepim_rpm
+++ b/desktop/rpm/kdepim_rpm
@@ -1,81 +1,81 @@
Summary: A collection of PIM programs
Name: KDE-Pim-Pi
-Version: 1.9.11
+Version: 1.9.13
Release: SuSE_9.1
Copyright:GPL
Group: Productivity/Pim
Source:http://sourceforge.net/projects/kdepimpi/
URL:http://sourceforge.net/projects/kdepimpi/
Packager: zautrix
%description
This package contains the platform-independent PIM programs from
www.pi-sync.net, compiled for SuSE 9.1:
KTimeTacker/Pi
KPhone/Pi
KAddressbook/Pi
KOrganizer/Pi
PasswordManager/Pi
These applications do not need anything from the KDE-desktop
at all to run on Linux. However, there is a dependency from
two KDE libs, because a small command line program is included
to make it possible to sync with the KDE-desktop applications.
These applications are independent from the KDE-desktop
environment. That means, nothing of your existing
KDE-desktop setup will be changed, or any data
(calendar-addressbook) used by the KDE-desktop
applications will be changed or accessed.
These applications stores their data and config in
$HOME/kdepim/
However, because the same file format is used,
an easy exchange of data with the KDE-desktop
is possible.
A small command line program is included
to make it possible to sync with the KDE-desktop applications.
You do not need to call this program from the commandline,
it is called from the KDE-Pim/Pi apps when you choose there:
Sync with KDE_Desktop.
If something is going wrong, please start the
KDE-Pim/Pi program itself from the console to get detailed output.
After installation, you should have a
PIM-pi
folder in your KDE start menu, where you can
start the applications from.
These programs makes it possible to sync your Zaurus easily
(with the KDE-Pim/Pi programs running on the Zaurus)
with the KDE-desktop calendar/addressbook data.
If you want to use that, you have to update your
KDE-desktop to version 3.3.0 or higher.
Actually - after the (non difficult) configuration is set up -
with two mouseklicks on the Zaurus,
the Zaurus syncs with the corresponding KDE-Pim/Pi
program on the Linux Desktop which syncs automatically
with the KDE-desktop data.
If you want to use the KDE-desktop calendar/addressbook applications,
just install these apps in this package and use them as a syncing tool for the
Zaurus <-> KDE-desktop sync.
The sync requires a network connection from your Zaurus to
the PC. A detailed Sync HowTo is available in the
Help menu of the applications.
These applications makes it also possible, that you can sync
(or just export the data to) your mobile phone with your
data of the KDE-desktop calendar/addressbook applications.
This is tested and working for Nokia mobile phones,
it may work with others as well.
(More info about that: -> Sync HowTo)
NOTE:
You have to make an online update in SuSE 9.1 to make it
possible to get the infrared connection working, such that
you can sync your (Nokia) mobile phone via infrared.
%files
/opt/kde3/share/applnk/PIM-pi/
/opt/kdepimpi/
/usr/lib/libmicro*
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp
index eb07ef1..f54fe2b 100644
--- a/kmicromail/libmailwrapper/smtpwrapper.cpp
+++ b/kmicromail/libmailwrapper/smtpwrapper.cpp
@@ -1,231 +1,231 @@
#include "smtpwrapper.h"
#include "mailwrapper.h"
#include "abstractmail.h"
#include "logindialog.h"
#include "mailtypes.h"
#include "sendmailprogress.h"
//#include <opie2/odebug.h>
//#include <qt.h>
#include <qapplication.h>
#include <qmessagebox.h>
#include <stdlib.h>
#ifndef DESKTOP_VERSION
//#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
#endif
#include <libetpan/libetpan.h>
#include <klocale.h>
#include <kglobal.h>
#include <kconfig.h>
using namespace Opie::Core;
progressMailSend*SMTPwrapper::sendProgress = 0;
SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp )
: Generatemail()
{
m_SmtpAccount = aSmtp;
- KConfig cfg( locateLocal("config", "kopiemail" ) );
+ KConfig cfg( locateLocal("config", "kopiemailrc" ) );
cfg.setGroup( "Status" );
m_queuedMail = cfg.readNumEntry( "outgoing", 0 );
emit queuedMails( m_queuedMail );
connect( this, SIGNAL( queuedMails(int) ), this, SLOT( emitQCop(int) ) );
m_smtp = 0;
}
SMTPwrapper::~SMTPwrapper()
{
disc_server();
}
void SMTPwrapper::emitQCop( int queued ) {
#ifndef DESKTOP_VERSION
QCopEnvelope env( "QPE/Pim", "outgoingMails(int)" );
env << queued;
#endif
}
QString SMTPwrapper::mailsmtpError( int errnum ) {
switch ( errnum ) {
case MAILSMTP_NO_ERROR:
return i18n( "No error" );
case MAILSMTP_ERROR_UNEXPECTED_CODE:
return i18n( "Unexpected error code" );
case MAILSMTP_ERROR_SERVICE_NOT_AVAILABLE:
return i18n( "Service not available" );
case MAILSMTP_ERROR_STREAM:
return i18n( "Stream error" );
case MAILSMTP_ERROR_HOSTNAME:
return i18n( "gethostname() failed" );
case MAILSMTP_ERROR_NOT_IMPLEMENTED:
return i18n( "Not implemented" );
case MAILSMTP_ERROR_ACTION_NOT_TAKEN:
return i18n( "Error, action not taken" );
case MAILSMTP_ERROR_EXCEED_STORAGE_ALLOCATION:
return i18n( "Data exceeds storage allocation" );
case MAILSMTP_ERROR_IN_PROCESSING:
return i18n( "Error in processing" );
case MAILSMTP_ERROR_STARTTLS_NOT_SUPPORTED:
return i18n( "Starttls not supported" );
// case MAILSMTP_ERROR_INSUFFISANT_SYSTEM_STORAGE:
// return i18n( "Insufficient system storage" );
case MAILSMTP_ERROR_MAILBOX_UNAVAILABLE:
return i18n( "Mailbox unavailable" );
case MAILSMTP_ERROR_MAILBOX_NAME_NOT_ALLOWED:
return i18n( "Mailbox name not allowed" );
case MAILSMTP_ERROR_BAD_SEQUENCE_OF_COMMAND:
return i18n( "Bad command sequence" );
case MAILSMTP_ERROR_USER_NOT_LOCAL:
return i18n( "User not local" );
case MAILSMTP_ERROR_TRANSACTION_FAILED:
return i18n( "Transaction failed" );
case MAILSMTP_ERROR_MEMORY:
return i18n( "Memory error" );
case MAILSMTP_ERROR_CONNECTION_REFUSED:
return i18n( "Connection refused" );
default:
return i18n( "Unknown error code" );
}
}
void SMTPwrapper::progress( size_t current, size_t maximum ) {
if (SMTPwrapper::sendProgress) {
SMTPwrapper::sendProgress->setSingleMail(current, maximum );
qApp->processEvents();
}
}
void SMTPwrapper::storeMail(const char*mail, size_t length, const QString&box) {
if (!mail)
return;
QString localfolders = AbstractMail::defaultLocalfolder();
AbstractMail*wrap = AbstractMail::getWrapper(localfolders);
wrap->createMbox(box);
wrap->storeMessage(mail,length,box);
delete wrap;
}
bool SMTPwrapper::smtpSend( mailmime *mail,bool later) {
clist *rcpts = 0;
char *from, *data;
size_t size;
from = data = 0;
mailmessage * msg = 0;
msg = mime_message_init(mail);
mime_message_set_tmpdir(msg,getenv( "HOME" ));
int r = mailmessage_fetch(msg,&data,&size);
mime_message_detach_mime(msg);
mailmessage_free(msg);
if (r != MAIL_NO_ERROR || !data) {
if (data)
free(data);
qDebug("Error fetching mime... ");
return false;
}
msg = 0;
if (later) {
storeMail(data,size,"Outgoing");
if (data)
free( data );
- KConfig cfg( locateLocal("config", "kopiemail" ) );
+ KConfig cfg( locateLocal("config", "kopiemailrc" ) );
cfg.setGroup( "Status" );
cfg.writeEntry( "outgoing", ++m_queuedMail );
emit queuedMails( m_queuedMail );
return true;
}
from = getFrom( mail );
rcpts = createRcptList( mail->mm_data.mm_message.mm_fields );
bool result = smtpSend(from,rcpts,data,size);
if (data) {
free(data);
}
if (from) {
free(from);
}
if (rcpts)
smtp_address_list_free( rcpts );
return result;
}
void SMTPwrapper::storeFailedMail(const char*data,unsigned int size, const char*failuremessage)
{
if (data) {
storeMail(data,size,"Sendfailed");
}
if (failuremessage) {
QMessageBox::critical(0,i18n("Error sending mail"),
i18n("<center>%1</center>").arg(failuremessage));
}
}
int SMTPwrapper::start_smtp_tls()
{
if (!m_smtp) {
return MAILSMTP_ERROR_IN_PROCESSING;
}
int err = mailesmtp_starttls(m_smtp);
if (err != MAILSMTP_NO_ERROR) return err;
mailstream_low * low;
mailstream_low * new_low;
low = mailstream_get_low(m_smtp->stream);
if (!low) {
return MAILSMTP_ERROR_IN_PROCESSING;
}
int fd = mailstream_low_get_fd(low);
if (fd > -1 && (new_low = mailstream_low_ssl_open(fd))!=0) {
mailstream_low_free(low);
mailstream_set_low(m_smtp->stream, new_low);
} else {
return MAILSMTP_ERROR_IN_PROCESSING;
}
return err;
}
void SMTPwrapper::connect_server()
{
QString server, user, pass;
bool ssl;
uint16_t port;
ssl = false;
bool try_tls = true;
bool force_tls=false;
QString failuretext = "";
if (m_smtp || !m_SmtpAccount) {
return;
}
server = m_SmtpAccount->getServer();
if ( m_SmtpAccount->ConnectionType() == 2 ) {
ssl = true;
try_tls = false;
} else if (m_SmtpAccount->ConnectionType() == 1) {
force_tls = true;
}
int result = 1;
port = m_SmtpAccount->getPort().toUInt();
m_smtp = mailsmtp_new( 20, &progress );
if ( m_smtp == NULL ) {
/* no failure message cause this happens when problems with memory - than we
we can not display any messagebox */
return;
}
int err = MAILSMTP_NO_ERROR;
; // odebug << "Servername " << server << " at port " << port << "" << oendl;
if ( ssl ) {
; // odebug << "SSL session" << oendl;
err = mailsmtp_ssl_connect( m_smtp, server.latin1(), port );
} else {
; // odebug << "No SSL session" << oendl;
err = mailsmtp_socket_connect( m_smtp, server.latin1(), port );
}
if ( err != MAILSMTP_NO_ERROR ) {
; // odebug << "Error init connection" << oendl;
failuretext = i18n("Error init SMTP connection: %1").arg(mailsmtpError(err));
result = 0;
@@ -359,108 +359,108 @@ int SMTPwrapper::sendQueuedMail(AbstractMail*wrap,const RecMailP&which) {
if (err != MAILIMF_NO_ERROR) {
delete data;
delete wrap;
return 0;
}
rcpts = createRcptList( fields );
ffrom = getField(fields, MAILIMF_FIELD_FROM );
from = getFrom(ffrom);
if (rcpts && from) {
res = smtpSend(from,rcpts,data->Content(),data->Length());
}
if (fields) {
mailimf_fields_free(fields);
fields = 0;
}
if (data) {
delete data;
}
if (from) {
free(from);
}
if (rcpts) {
smtp_address_list_free( rcpts );
}
return res;
}
/* this is a special fun */
bool SMTPwrapper::flushOutbox() {
bool returnValue = true;
; // odebug << "Sending the queue" << oendl;
if (!m_SmtpAccount) {
; // odebug << "No smtp account given" << oendl;
return false;
}
bool reset_user_value = false;
QString localfolders = AbstractMail::defaultLocalfolder();
AbstractMail*wrap = AbstractMail::getWrapper(localfolders);
if (!wrap) {
; // odebug << "memory error" << oendl;
return false;
}
QString oldPw, oldUser;
QValueList<RecMailP> mailsToSend;
QValueList<RecMailP> mailsToRemove;
QString mbox("Outgoing");
wrap->listMessages(mbox,mailsToSend);
if (mailsToSend.count()==0) {
delete wrap;
; // odebug << "No mails to send" << oendl;
return false;
}
oldPw = m_SmtpAccount->getPassword();
oldUser = m_SmtpAccount->getUser();
if (m_SmtpAccount->getLogin() && (m_SmtpAccount->getUser().isEmpty() || m_SmtpAccount->getPassword().isEmpty()) ) {
// get'em
QString user,pass;
LoginDialog login( m_SmtpAccount->getUser(), m_SmtpAccount->getPassword(), NULL, 0, true );
login.show();
if ( QDialog::Accepted == login.exec() ) {
// ok
user = login.getUser().latin1();
pass = login.getPassword().latin1();
reset_user_value = true;
m_SmtpAccount->setUser(user);
m_SmtpAccount->setPassword(pass);
} else {
return true;
}
}
sendProgress = new progressMailSend();
sendProgress->show();
sendProgress->setMaxMails(mailsToSend.count());
while (mailsToSend.count()>0) {
if (sendQueuedMail(wrap, (*mailsToSend.begin()))==0) {
QMessageBox::critical(0,i18n("Error sending mail"),
i18n("Error sending queued mail - breaking"));
returnValue = false;
break;
}
mailsToRemove.append((*mailsToSend.begin()));
mailsToSend.remove(mailsToSend.begin());
sendProgress->setCurrentMails(mailsToRemove.count());
}
if (reset_user_value) {
m_SmtpAccount->setUser(oldUser);
m_SmtpAccount->setPassword(oldPw);
}
- KConfig cfg( locateLocal("config", "kopiemail" ) );
+ KConfig cfg( locateLocal("config", "kopiemailrc" ) );
cfg.setGroup( "Status" );
m_queuedMail = 0;
cfg.writeEntry( "outgoing", m_queuedMail );
emit queuedMails( m_queuedMail );
sendProgress->hide();
delete sendProgress;
sendProgress = 0;
wrap->deleteMails(mbox,mailsToRemove);
delete wrap;
return returnValue;
}
diff --git a/version b/version
index 4368d49..c4fe6e2 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-version = "1.9.12";
+version = "1.9.13";