PureBasic Forum
http://forums.purebasic.com/english/

POP3 Include (crossplatform)
http://forums.purebasic.com/english/viewtopic.php?f=12&t=51959
Page 2 of 3

Author:  HeX0R [ Fri Feb 07, 2014 7:28 pm ]
Post subject:  Re: POP3 Include (crossplatform)

bobobo wrote:
very nice .. but
mails sent with opera mail (standaloneVersion) (and attachement) will not show correct in the demo-appliation above.
(those mails will show correct with usual emailclients)


Dont know how to check what goes wrong. This PBI is too complex for me to even put in some debug-code to surround this
behaviour

If you send me a mail with opera (including an attachment), I can look into it.
=> h3x0r √ĄT h3x0r.ath.cx

Author:  bobobo [ Mon Feb 10, 2014 5:30 pm ]
Post subject:  Re: POP3 Include (crossplatform)

2 mails on the way
first with, second without attachement

greetings

Author:  HeX0R [ Mon Feb 10, 2014 8:10 pm ]
Post subject:  Re: POP3 Include (crossplatform)

Should be fixed.

Opera is a lazy browser (perfect partner for me? :mrgreen: ) and doesn't surround the filenames with doublequotes.

I also changed the example code a little bit.

Author:  bobobo [ Tue Feb 11, 2014 1:24 pm ]
Post subject:  Re: POP3 Include (crossplatform)

thanks .. this lazy opera-mail is handled now..

may be its even more handy with a possiblilty to save the complete mail as a file .

greetings

Author:  HeX0R [ Tue Feb 11, 2014 3:14 pm ]
Post subject:  Re: POP3 Include (crossplatform)

Yes, you are right.
Shouldn't be a big deal, will try to add it, when I find the time.

I guess eml format should be o.k., as far as I'm informed, this is just the raw email.
The msg-format from outlook looks a little bit strange (just had a quick look in an editor).

Author:  bobobo [ Tue Feb 11, 2014 5:37 pm ]
Post subject:  Re: POP3 Include (crossplatform)

please no msg !! :mrgreen:
keep it as readable as possible 8)

Author:  HeX0R [ Wed Feb 12, 2014 12:04 am ]
Post subject:  Re: POP3 Include (crossplatform)

Done!

The functionality was already there (didn't remember... ;))
I just had to change the example a little bit.
But as usual I also found a few glitches in the main include, therefore this has also been updated.

Author:  bobobo [ Wed Feb 12, 2014 12:27 pm ]
Post subject:  Re: POP3 Include (crossplatform)

Image

one more :D

Preview with monotype Font if mail is pure text

Author:  HeX0R [ Thu Feb 13, 2014 12:11 am ]
Post subject:  Re: POP3 Include (crossplatform)

bobobo wrote:
Image

one more :D

Preview with monotype Font if mail is pure text

What do you mean with "preview"?
The window on the right in the example?

Well, the example is just a bonbon and anyone can change it.
This thread is about the pop3.pbi and I don't think I would have to change anything there, to use a different font.
You have to add your font inside the html of this part of the example code:
Code:
c$ = "<html><head>" + #CRLF$
c$ + "<meta http-equiv=" + #DQUOTE$ + "content-type" + #DQUOTE$ + " content=" + #DQUOTE$ + b$ + #DQUOTE$ + ">" + #CRLF$
c$ + "</head><body><p>" + ReplaceString(a$, #CRLF$, "<br>") + "</p></body></html>"


I know, my codes look always more complicated, then they are in fact.
I really should start to use comments.

Problem is, whenever I have an idea for something, I start coding like a manic without adding any comments.
And afterwards I'm too lazy to add them.
I'm working on this problem, but probably I'm just too old to change my style...

Author:  bobobo [ Wed Feb 19, 2014 4:13 pm ]
Post subject:  Re: POP3 Include (crossplatform)

ok with the font :x

but .. contacting hmailer (a very common Mail-Server used in Windeos-contexts)
isn't possible..
No error shown in your app ..

hmailer.log says that "CAPA" is not correct when sent direct after POP3-Connection
Protocol from your testapp, which stops after that
Quote:
"POP3D" 2900 1659 "2014-02-19 16:07:18.245" "192.168.115.17" "SENT: +OK POP3"
"POP3D" 2700 1659 "2014-02-19 16:07:18.468" "192.168.115.17" "RECEIVED: CAPA"
"POP3D" 2700 1659 "2014-02-19 16:07:18.468" "192.168.115.17" "SENT: -ERR Invalid command in current state."


Protocol from a correct with a working-client
Quote:
"POP3D" 2900 1663 "2014-02-19 16:08:26.180" "192.168.115.17" "SENT: +OK POP3"
"POP3D" 1160 1663 "2014-02-19 16:08:26.187" "192.168.115.17" "RECEIVED: USER ok@intern.ml"
"POP3D" 1160 1663 "2014-02-19 16:08:26.188" "192.168.115.17" "SENT: +OK Send your password"
"POP3D" 2768 1663 "2014-02-19 16:08:26.207" "192.168.115.17" "RECEIVED: PASS ***"
"POP3D" 2768 1663 "2014-02-19 16:08:26.209" "192.168.115.17" "SENT: +OK Mailbox locked and ready"
"POP3D" 2756 1663 "2014-02-19 16:08:26.217" "192.168.115.17" "RECEIVED: STAT"
"POP3D" 2756 1663 "2014-02-19 16:08:26.217" "192.168.115.17" "SENT: +OK 0 0"
a.s.o.
...
..



---hmailerforum "says" to ignore the answer is best pratice , hmailer doesn't supoort "capa"
look here

Author:  HeX0R [ Wed Feb 19, 2014 8:20 pm ]
Post subject:  Re: POP3 Include (crossplatform)

bobobo wrote:
[...]
---hmailerforum "says" to ignore the answer is best pratice , hmailer doesn't supoort "capa"
[...]

I know that not any mailserver is supporting CAPA, see line 717 in pop3.pbi:
Code:
;Check what options this server offers (not all will answer this call)

If it doesn't get any response, or a response with no capabilities in it (as in your case, just an error message), *THIS\Capabilities will be empty and it should test the next possible handshake-type.

I'm wondering why it should just stop, at least the USER Part should run (line 754).
Could you maybe help me with a few debug lines, to find out, why it doesn't get into this If-part:
Code:
If *THIS\LastError = #POP3_ERROR_NONE And Result = #False And (*THIS\Capability = "" Or FindString(*THIS\Capability, ";USER;", 1))

Author:  bobobo [ Thu Feb 20, 2014 5:11 pm ]
Post subject:  Re: POP3 Include (crossplatform)

hmm .. ok
i put some debugs in the pbi . with linenumbers
Quote:
line 712 a$ :|+OK POP3| LastErr 0
Line 107 Response :+OK POP3 LastErr 0
Line 715 is called LastErr 0
Line 211 Send CAPA
line 721 is called LastErr 14
line 738 is called LastErr 14
line 753 LastErr 14


line 738 isn't called when connecting to another server (there is no timeout and everything runs fine)

Author:  HeX0R [ Thu Feb 20, 2014 9:20 pm ]
Post subject:  Re: POP3 Include (crossplatform)

Should be fixed, could you try please?

Author:  bobobo [ Wed Mar 05, 2014 4:24 pm ]
Post subject:  Re: POP3 Include (crossplatform)

Sorry for late reply

works better

show amount of emails
but doesn't show email destails (i have 4 emails waiting and nothing is shown)
AND the program says Disconnect while it is connected then wich results in an
error when try to connect again (only if there ARE emails)
With no emails its ok.

(using hmailer)

Author:  HeX0R [ Thu Mar 06, 2014 9:54 pm ]
Post subject:  Re: POP3 Include (crossplatform)

Yes, this was a really stupid one, should be fixed also.

Page 2 of 3 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/