author | groucho <groucho> | 2003-04-15 08:07:53 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-04-15 08:07:53 (UTC) |
commit | d0de397e46581f6ed5fcfad320b2b61be3858c5d (patch) (unidiff) | |
tree | 1110503d72aa11947642a640ab50656f82c33a71 /noncore/net/mailit/smtpclient.cpp | |
parent | e263613e83b64fa93b5f3c1b904715daf076cc78 (diff) | |
download | opie-d0de397e46581f6ed5fcfad320b2b61be3858c5d.zip opie-d0de397e46581f6ed5fcfad320b2b61be3858c5d.tar.gz opie-d0de397e46581f6ed5fcfad320b2b61be3858c5d.tar.bz2 |
- SMTP fix preventing authorization with SMTP after POP
- removed debug output
- smaller bug fixes
Diffstat (limited to 'noncore/net/mailit/smtpclient.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mailit/smtpclient.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/noncore/net/mailit/smtpclient.cpp b/noncore/net/mailit/smtpclient.cpp index 6699a90..b2e38e5 100644 --- a/noncore/net/mailit/smtpclient.cpp +++ b/noncore/net/mailit/smtpclient.cpp | |||
@@ -86,35 +86,35 @@ void SmtpClient::incomingData() | |||
86 | if (!socket->canReadLine()) | 86 | if (!socket->canReadLine()) |
87 | return; | 87 | return; |
88 | 88 | ||
89 | response = socket->readLine(); | 89 | response = socket->readLine(); |
90 | qDebug(response); | 90 | //qDebug(response); |
91 | 91 | ||
92 | switch(status) { | 92 | switch(status) { |
93 | case Init: { | 93 | case Init: { |
94 | if (response[0] == '2') { | 94 | if (response[0] == '2') { |
95 | status = From; | 95 | status = From; |
96 | mailPtr = mailList.first(); | 96 | mailPtr = mailList.first(); |
97 | *stream << "HELO there\r\n"; | 97 | *stream << "HELO there\r\n"; |
98 | qDebug("HELO"); | 98 | //qDebug("HELO"); |
99 | } else errorHandling(ErrUnknownResponse); | 99 | } else errorHandling(ErrUnknownResponse); |
100 | break; | 100 | break; |
101 | } | 101 | } |
102 | case From: { | 102 | case From: { |
103 | if (response[0] == '2') { | 103 | if (response[0] == '2') { |
104 | *stream << "MAIL FROM: <" << mailPtr->from << ">\r\n"; | 104 | *stream << "MAIL FROM: " << mailPtr->from << "\r\n"; |
105 | status = Recv; | 105 | status = Recv; |
106 | qDebug("MAIL FROM: "+mailPtr->from); | 106 | //qDebug("MAIL FROM: "+mailPtr->from); |
107 | } else errorHandling(ErrUnknownResponse); | 107 | } else errorHandling(ErrUnknownResponse); |
108 | break; | 108 | break; |
109 | } | 109 | } |
110 | case Recv: { | 110 | case Recv: { |
111 | if (response[0] == '2') { | 111 | if (response[0] == '2') { |
112 | it = mailPtr->to.begin(); | 112 | it = mailPtr->to.begin(); |
113 | if (it == NULL) | 113 | if (it == NULL) |
114 | errorHandling(ErrUnknownResponse); | 114 | errorHandling(ErrUnknownResponse); |
115 | *stream << "RCPT TO: <" << *it << ">\r\n"; | 115 | *stream << "RCPT TO: " << *it << ">\r\n"; |
116 | qDebug("RCPT TO: "+ *it); | 116 | //qDebug("RCPT TO: "+ *it); |
117 | status = MRcv; | 117 | status = MRcv; |
118 | } else errorHandling(ErrUnknownResponse); | 118 | } else errorHandling(ErrUnknownResponse); |
119 | break; | 119 | break; |
120 | } | 120 | } |
@@ -122,9 +122,9 @@ void SmtpClient::incomingData() | |||
122 | if (response[0] == '2') { | 122 | if (response[0] == '2') { |
123 | it++; | 123 | it++; |
124 | if ( it != mailPtr->to.end() ) { | 124 | if ( it != mailPtr->to.end() ) { |
125 | *stream << "RCPT TO: <" << *it << ">\r\n"; | 125 | *stream << "RCPT TO: <" << *it << ">\r\n"; |
126 | qDebug("RCPT TO: "+ *it); | 126 | //qDebug("RCPT TO: "+ *it); |
127 | break; | 127 | break; |
128 | } else { | 128 | } else { |
129 | status = Data; | 129 | status = Data; |
130 | } | 130 | } |
@@ -133,9 +133,9 @@ void SmtpClient::incomingData() | |||
133 | case Data: { | 133 | case Data: { |
134 | if (response[0] == '2') { | 134 | if (response[0] == '2') { |
135 | *stream << "DATA\r\n"; | 135 | *stream << "DATA\r\n"; |
136 | status = Body; | 136 | status = Body; |
137 | qDebug("DATA"); | 137 | //qDebug("DATA"); |
138 | emit updateStatus(tr("Sending: ") + mailPtr->subject); | 138 | emit updateStatus(tr("Sending: ") + mailPtr->subject); |
139 | } else errorHandling(ErrUnknownResponse); | 139 | } else errorHandling(ErrUnknownResponse); |
140 | break; | 140 | break; |
141 | } | 141 | } |
@@ -147,9 +147,9 @@ void SmtpClient::incomingData() | |||
147 | status = From; | 147 | status = From; |
148 | } else { | 148 | } else { |
149 | status = Quit; | 149 | status = Quit; |
150 | } | 150 | } |
151 | qDebug("BODY"); | 151 | //qDebug("BODY"); |
152 | } else errorHandling(ErrUnknownResponse); | 152 | } else errorHandling(ErrUnknownResponse); |
153 | break; | 153 | break; |
154 | } | 154 | } |
155 | case Quit: { | 155 | case Quit: { |
@@ -162,9 +162,9 @@ void SmtpClient::incomingData() | |||
162 | emit mailSent(); | 162 | emit mailSent(); |
163 | mailList.clear(); | 163 | mailList.clear(); |
164 | sending = FALSE; | 164 | sending = FALSE; |
165 | socket->close(); | 165 | socket->close(); |
166 | qDebug("QUIT"); | 166 | //qDebug("QUIT"); |
167 | } else errorHandling(ErrUnknownResponse); | 167 | } else errorHandling(ErrUnknownResponse); |
168 | break; | 168 | break; |
169 | } | 169 | } |
170 | } | 170 | } |