[Kst] SMTP support

Adriaan de Groot adridg at cs.kun.nl
Sun Jul 11 17:41:39 CEST 2004

Hash: SHA1

Hi Kst,

Today I committed a fix removing alloca() from emailthread.cpp (it's not 
portable beyond Linux, basically, and the use it was put to here was 
certainly bogus). You should probably check that it's ok, though (replacing 
alloca with a new[] and a delete[]).

Looking at the code, though, two things struck me:

1) Since you're really only interested in the first 3 bytes of the server's 
response, why not read the first 3 bytes and then drain the remainder of the 
data from the QSocketDevice? That would save messing with the heap entirely.

2) <clippy>It looks like you're trying to write some SMTP client code. Perhaps 
you want to use the SMTP IOSlave instead?</clippy> I used to have a SMTP 
client in KPilot and threw it out, hoping that using the SMTP  IOSlave would 
be easy, but never got the time to actually _do_ it , so I can't say how easy 
(or hard) this is - but duplicating the code really doesn't seem like a good 


- -- 
   "On top of that [watching KDE CVS] is interesting in a perverse 
    way, like watching sausage get made. By very smart people." - dkite
Version: GnuPG v1.2.4 (FreeBSD)


More information about the Kst mailing list