summaryrefslogtreecommitdiffabout
path: root/kmicromail
authorzautrix <zautrix>2005-03-10 21:14:19 (UTC)
committer zautrix <zautrix>2005-03-10 21:14:19 (UTC)
commit6e3c3178fa8e0c421753c08506b4a91bbcecc26f (patch) (side-by-side diff)
treeff9c2b22376e71e135f59154c6aeeb8ed95f10ce /kmicromail
parent3a1891136e7b1290a6b3ddd573a863e51bd3047b (diff)
downloadkdepimpi-6e3c3178fa8e0c421753c08506b4a91bbcecc26f.zip
kdepimpi-6e3c3178fa8e0c421753c08506b4a91bbcecc26f.tar.gz
kdepimpi-6e3c3178fa8e0c421753c08506b4a91bbcecc26f.tar.bz2
smtp ompi fix
Diffstat (limited to 'kmicromail') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/editaccounts.cpp24
-rw-r--r--kmicromail/libetpan/tools/mailstream_socket.c2
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp8
3 files changed, 20 insertions, 14 deletions
diff --git a/kmicromail/editaccounts.cpp b/kmicromail/editaccounts.cpp
index f1075c0..49049f6 100644
--- a/kmicromail/editaccounts.cpp
+++ b/kmicromail/editaccounts.cpp
@@ -330,7 +330,7 @@ IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name,
{
data = account;
- fillValues();
+ //fillValues();
connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) );
ComboBox1->insertItem( "Only if available", 0 );
@@ -338,7 +338,8 @@ IMAPconfig::IMAPconfig( IMAPaccount *account, QWidget *parent, const char *name,
ComboBox1->insertItem( "Connect on secure port", 2 );
ComboBox1->insertItem( "Run command instead", 3 );
CommandEdit->hide();
- ComboBox1->setCurrentItem( data->ConnectionType() );
+ fillValues();
+ // ComboBox1->setCurrentItem( data->ConnectionType() );
}
void IMAPconfig::slotConnectionToggle( int index )
@@ -409,7 +410,7 @@ POP3config::POP3config( POP3account *account, QWidget *parent, const char *name,
: POP3configUI( parent, name, modal, flags )
{
data = account;
- fillValues();
+ //fillValues();
connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) );
ComboBox1->insertItem( "Only if available", 0 );
@@ -417,7 +418,8 @@ POP3config::POP3config( POP3account *account, QWidget *parent, const char *name,
ComboBox1->insertItem( "Connect on secure port", 2 );
ComboBox1->insertItem( "Run command instead", 3 );
CommandEdit->hide();
- ComboBox1->setCurrentItem( data->ConnectionType() );
+ fillValues();
+ //ComboBox1->setCurrentItem( data->ConnectionType() );
}
void POP3config::slotConnectionToggle( int index )
@@ -491,7 +493,7 @@ SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name,
connect( loginBox, SIGNAL( toggled(bool) ), userLine, SLOT( setEnabled(bool) ) );
connect( loginBox, SIGNAL( toggled(bool) ), passLine, SLOT( setEnabled(bool) ) );
- fillValues();
+ // fillValues();
QIconSet icon;
//icon = SmallIcon("fileexport");
icon = SmallIcon("fileopen");
@@ -500,12 +502,14 @@ SMTPconfig::SMTPconfig( SMTPaccount *account, QWidget *parent, const char *name,
SignaturButton->setMaximumSize ( SignaturButton->sizeHint().height()+4,SignaturButton->sizeHint().height()) ;
connect( SignaturButton, SIGNAL( clicked() ), this, SLOT( chooseSig() ) );
connect( ComboBox1, SIGNAL( activated(int) ), SLOT( slotConnectionToggle(int) ) );
- ComboBox1->insertItem( "Only if available", 0 );
- ComboBox1->insertItem( "Always, Negotiated", 1 );
- ComboBox1->insertItem( "Connect on secure port", 2 );
- ComboBox1->insertItem( "Run command instead", 3 );
+ ComboBox1->insertItem( "No secure connection, no TLS", 0 );
+ ComboBox1->insertItem( "Only if available, try TLS", 1 );
+ ComboBox1->insertItem( "Always, use TLS", 2 );
+ ComboBox1->insertItem( "Connect on secure port (SSL)", 3 );
+ ComboBox1->insertItem( "Run command instead", 4 );
CommandEdit->hide();
- ComboBox1->setCurrentItem( data->ConnectionType() );
+ fillValues();
+ //ComboBox1->setCurrentItem( data->ConnectionType() );
}
void SMTPconfig::chooseSig()
{
diff --git a/kmicromail/libetpan/tools/mailstream_socket.c b/kmicromail/libetpan/tools/mailstream_socket.c
index 04a6f48..fd2c758 100644
--- a/kmicromail/libetpan/tools/mailstream_socket.c
+++ b/kmicromail/libetpan/tools/mailstream_socket.c
@@ -206,7 +206,7 @@ static ssize_t mailstream_low_socket_write(mailstream_low * s,
// LUTZ next line blocks sometimes
if ( timeout.tv_sec > DEFAULT_NETWORK_TIMEOUT )
timeout.tv_sec = DEFAULT_NETWORK_TIMEOUT;
- fprintf(stderr,"fd %d to secs %d \n", socket_data->fd, timeout.tv_sec );
+ //fprintf(stderr,"fd %d to secs %d \n", socket_data->fd, timeout.tv_sec );
r = select(socket_data->fd + 1, NULL, &fds_write, &fds_excp, &timeout);
if (r < 1)
return -1;
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp
index 5096f67..872a460 100644
--- a/kmicromail/libmailwrapper/smtpwrapper.cpp
+++ b/kmicromail/libmailwrapper/smtpwrapper.cpp
@@ -193,7 +193,7 @@ void SMTPwrapper::connect_server()
bool ssl;
uint16_t port;
ssl = false;
- bool try_tls = true;
+ bool try_tls = false;
bool force_tls=false;
QString failuretext = "";
@@ -201,11 +201,13 @@ void SMTPwrapper::connect_server()
return;
}
server = m_SmtpAccount->getServer();
- if ( m_SmtpAccount->ConnectionType() == 2 ) {
+ if ( m_SmtpAccount->ConnectionType() == 3 ) {
ssl = true;
try_tls = false;
- } else if (m_SmtpAccount->ConnectionType() == 1) {
+ } else if (m_SmtpAccount->ConnectionType() == 2) {
force_tls = true;
+ } else if (m_SmtpAccount->ConnectionType() == 1) {
+ try_tls = true;
}
int result = 1;
port = m_SmtpAccount->getPort().toUInt();