summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2005-03-11 19:26:02 (UTC)
committer zautrix <zautrix>2005-03-11 19:26:02 (UTC)
commit1166a4797a91cedd5002a3513d5028c5e86016f0 (patch) (side-by-side diff)
tree8e7443bc887a15dcf3852abd36e6e61f2e6bddad /kmicromail
parent71462ba8ef1803787bba6793f1adb85987eb57df (diff)
downloadkdepimpi-1166a4797a91cedd5002a3513d5028c5e86016f0.zip
kdepimpi-1166a4797a91cedd5002a3513d5028c5e86016f0.tar.gz
kdepimpi-1166a4797a91cedd5002a3513d5028c5e86016f0.tar.bz2
better kopi export
Diffstat (limited to 'kmicromail') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/editaccounts.cpp12
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp17
2 files changed, 25 insertions, 4 deletions
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index 49049f6..2c0f2d8 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -349,2 +349,3 @@ void IMAPconfig::slotConnectionToggle( int index )
portLine->setText( IMAP_SSL_PORT );
+ CommandEdit->hide();
}
@@ -358,2 +359,3 @@ void IMAPconfig::slotConnectionToggle( int index )
portLine->setText( IMAP_PORT );
+ CommandEdit->hide();
}
@@ -430,2 +432,3 @@ void POP3config::slotConnectionToggle( int index )
portLine->setText( POP3_SSL_PORT );
+ CommandEdit->hide();
}
@@ -439,2 +442,3 @@ void POP3config::slotConnectionToggle( int index )
portLine->setText( POP3_PORT );
+ CommandEdit->hide();
}
@@ -522,8 +526,9 @@ void SMTPconfig::slotConnectionToggle( int index )
{
- // 2 is ssl connection
- if ( index == 2 )
+ // 3 is ssl connection
+ if ( index == 3 )
{
portLine->setText( SMTP_SSL_PORT );
+ CommandEdit->hide();
}
- else if ( index == 3 )
+ else if ( index == 4 )
{
@@ -535,2 +540,3 @@ void SMTPconfig::slotConnectionToggle( int index )
portLine->setText( SMTP_PORT );
+ CommandEdit->hide();
}
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp
index 872a460..845c71c 100644
--- a/kmicromail/libmailwrapper/smtpwrapper.cpp
+++ b/kmicromail/libmailwrapper/smtpwrapper.cpp
@@ -246,3 +246,3 @@ void SMTPwrapper::connect_server()
}
- if (try_tls) {
+ if (result && try_tls) {
qDebug("Smpt: Try tls ");
@@ -254,2 +254,4 @@ void SMTPwrapper::connect_server()
err = mailesmtp_ehlo(m_smtp);
+ if ( err != MAILSMTP_NO_ERROR )
+ result = 0;
}
@@ -292,2 +294,6 @@ void SMTPwrapper::connect_server()
}
+ if ( result == 0 ) {
+ mailsmtp_free(m_smtp);
+ m_smtp = 0;
+ }
}
@@ -349,2 +355,6 @@ bool SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later
mailmime_free( mimeMail );
+ if ( m_smtp ) {
+ mailsmtp_free(m_smtp);
+ m_smtp = 0;
+ }
}
@@ -460,2 +470,3 @@ bool SMTPwrapper::flushOutbox() {
}
+
KConfig cfg( locateLocal("config", "kopiemailrc" ) );
@@ -470,2 +481,6 @@ bool SMTPwrapper::flushOutbox() {
delete wrap;
+ if ( m_smtp ) {
+ mailsmtp_free(m_smtp);
+ m_smtp = 0;
+ }
return returnValue;