POP3 Include (crossplatform)

Share your advanced PureBasic knowledge/code with the community.
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: POP3 Include (crossplatform)

Post by HeX0R »

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
User avatar
bobobo
Enthusiast
Enthusiast
Posts: 202
Joined: Mon Jun 09, 2003 8:30 am

Re: POP3 Include (crossplatform)

Post by bobobo »

2 mails on the way
first with, second without attachement

greetings
사십 둘 .
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: POP3 Include (crossplatform)

Post by HeX0R »

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.
User avatar
bobobo
Enthusiast
Enthusiast
Posts: 202
Joined: Mon Jun 09, 2003 8:30 am

Re: POP3 Include (crossplatform)

Post by bobobo »

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
사십 둘 .
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: POP3 Include (crossplatform)

Post by HeX0R »

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).
User avatar
bobobo
Enthusiast
Enthusiast
Posts: 202
Joined: Mon Jun 09, 2003 8:30 am

Re: POP3 Include (crossplatform)

Post by bobobo »

please no msg !! :mrgreen:
keep it as readable as possible 8)
사십 둘 .
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: POP3 Include (crossplatform)

Post by HeX0R »

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.
User avatar
bobobo
Enthusiast
Enthusiast
Posts: 202
Joined: Mon Jun 09, 2003 8:30 am

Re: POP3 Include (crossplatform)

Post by bobobo »

Image

one more :D

Preview with monotype Font if mail is pure text
사십 둘 .
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: POP3 Include (crossplatform)

Post by HeX0R »

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: Select all

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...
User avatar
bobobo
Enthusiast
Enthusiast
Posts: 202
Joined: Mon Jun 09, 2003 8:30 am

Re: POP3 Include (crossplatform)

Post by bobobo »

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
"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
"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
사십 둘 .
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: POP3 Include (crossplatform)

Post by HeX0R »

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: Select all

;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: Select all

If *THIS\LastError = #POP3_ERROR_NONE And Result = #False And (*THIS\Capability = "" Or FindString(*THIS\Capability, ";USER;", 1))
User avatar
bobobo
Enthusiast
Enthusiast
Posts: 202
Joined: Mon Jun 09, 2003 8:30 am

Re: POP3 Include (crossplatform)

Post by bobobo »

hmm .. ok
i put some debugs in the pbi . with linenumbers
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)
사십 둘 .
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: POP3 Include (crossplatform)

Post by HeX0R »

Should be fixed, could you try please?
User avatar
bobobo
Enthusiast
Enthusiast
Posts: 202
Joined: Mon Jun 09, 2003 8:30 am

Re: POP3 Include (crossplatform)

Post by bobobo »

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)
사십 둘 .
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: POP3 Include (crossplatform)

Post by HeX0R »

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