summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper/smtpwrapper.cpp
authorzautrix <zautrix>2004-09-10 16:47:36 (UTC)
committer zautrix <zautrix>2004-09-10 16:47:36 (UTC)
commit157120031b77a3d9f10d780a66b6441dac1399fa (patch) (side-by-side diff)
treefe756e71b5290940d2824d06c11e5f887a6f00e2 /kmicromail/libmailwrapper/smtpwrapper.cpp
parent3b3e910d97287f6a538c114458d97800d430799a (diff)
downloadkdepimpi-157120031b77a3d9f10d780a66b6441dac1399fa.zip
kdepimpi-157120031b77a3d9f10d780a66b6441dac1399fa.tar.gz
kdepimpi-157120031b77a3d9f10d780a66b6441dac1399fa.tar.bz2
Fixes in password dislog handling
Diffstat (limited to 'kmicromail/libmailwrapper/smtpwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp
index 6a1b505..d5a528c 100644
--- a/kmicromail/libmailwrapper/smtpwrapper.cpp
+++ b/kmicromail/libmailwrapper/smtpwrapper.cpp
@@ -182,19 +182,18 @@ int SMTPwrapper::start_smtp_tls()
void SMTPwrapper::connect_server()
{
- const char *server, *user, *pass;
+ QString server, user, pass;
bool ssl;
uint16_t port;
ssl = false;
bool try_tls = true;
bool force_tls=false;
- server = user = pass = 0;
QString failuretext = "";
if (m_smtp || !m_SmtpAccount) {
return;
}
- server = m_SmtpAccount->getServer().latin1();
+ server = m_SmtpAccount->getServer();
if ( m_SmtpAccount->ConnectionType() == 2 ) {
ssl = true;
try_tls = false;
@@ -215,10 +214,10 @@ void SMTPwrapper::connect_server()
; // odebug << "Servername " << server << " at port " << port << "" << oendl;
if ( ssl ) {
; // odebug << "SSL session" << oendl;
- err = mailsmtp_ssl_connect( m_smtp, server, port );
+ err = mailsmtp_ssl_connect( m_smtp, server.latin1(), port );
} else {
; // odebug << "No SSL session" << oendl;
- err = mailsmtp_socket_connect( m_smtp, server, port );
+ err = mailsmtp_socket_connect( m_smtp, server.latin1(), port );
}
if ( err != MAILSMTP_NO_ERROR ) {
; // odebug << "Error init connection" << oendl;
@@ -258,19 +257,19 @@ void SMTPwrapper::connect_server()
login.show();
if ( QDialog::Accepted == login.exec() ) {
// ok
- user = login.getUser().latin1();
- pass = login.getPassword().latin1();
+ user = login.getUser();
+ pass = login.getPassword();
} else {
result = 0;
failuretext=tr("Login aborted - storing mail to localfolder");
}
} else {
- user = m_SmtpAccount->getUser().latin1();
- pass = m_SmtpAccount->getPassword().latin1();
+ user = m_SmtpAccount->getUser();
+ pass = m_SmtpAccount->getPassword();
}
; // odebug << "session->auth: " << m_smtp->auth << "" << oendl;
if (result) {
- err = mailsmtp_auth( m_smtp, (char*)user, (char*)pass );
+ err = mailsmtp_auth( m_smtp, (char*)user.latin1(), (char*)pass.latin1() );
if ( err == MAILSMTP_NO_ERROR ) {
; // odebug << "auth ok" << oendl;
} else {