NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tglomb

Pages: 1 ... 3 4 [5]
61
Problem solved !!!
They send the answers in two or more packets and thatswhy NetReceiveEmail gets confused. The answer to RETR 1 comes in 4 packets as +, all the text, '<13>', '<10>.<13,10>'. I remembered the code in my native NetSimple Progs within Process, case self.Packet.PacketType, of NET:SimpleDataPacket and I collect now everything (it's a little bit quick and dirty..) before letting Parent.Process() do the rest. The code I use now follows at the end for anyone who is interested (ATM I use the NetDemo example and the Loging refers to it).
Anyone is welcome to comment it or show me how to do it smother !
Thanks Bruce for your Patience here.
Thomas

! loc:PlusOnly is a bool(0), loc:SavePacket is a string( NET:MaxBinData)
log = clip(log) & '<13,10> <<<< -------------------------------------------------- new packet received -'
 
  if clip(self.packet.bindata) = '+'
    loc:PlusOnly= true
    log = clip(log) & '<13,10> + only - waiting for the rest !'
    return
  else
    if loc:PlusOnly
      loc:PlusOnly= false
      self.packet.bindata= '+' & clip(self.packet.bindata)
      self.packet.bindatalen+= 1
    end
  end
 
  if instring( '+OK Message follows', self.packet.bindata, 1, 1)
    if self.packet.bindata[ self.packet.bindatalen-4 : self.packet.bindatalen] <> '<13,10>.<13,10>' ! for security only
      loc:SavePacket= clip(self.packet.bindata)
      log = clip(log) & '<13,10> missing expected "end of email" - waiting for next packet (1) !'
      return
    end
  end
 
  if instring( '+OK Message follows', loc:SavePacket, 1, 1)
   
    log = clip(log) & '<13,10> ### |'
    loop k#= 1 to self.packet.bindatalen
      log = clip(log) & val( self.packet.bindata[ k#]) & '|'
    end!loop
    log = clip(log) & ' ###'
   
    loc:SavePacket= clip( loc:SavePacket) & clip(self.packet.bindata)
    k#= len( clip( loc:SavePacket))
    if loc:SavePacket[ k#-4 : k#] = '<13,10>.<13,10>'
      self.packet.bindata= clip( loc:SavePacket)
      self.packet.bindatalen= k#
      loc:SavePacket= ''
    else
      log = clip(log) & '<13,10> missing expected "end of email" - waiting for next packet (2) !'
      return
    end
    log = clip(log) & '<13,10> <<<< ' & clip(self.packet.bindata)
   
  else
    log = clip(log) & '<13,10> <<<< ' & clip(self.packet.bindata)
  end
 
  display(?log)

62
Hello Bruce,
I think I found the problem.. Every answer of the server comes with 2 packets, first the + alone and after the OK..ect..
But the evaluation of the packet starts immediately after the first, the single + and so the Class breaks out (in _ProcessSplitReturned for LIST resp.  _ProcessCopyBinData for RETR).

So how can I "wait" for the complete answer ? This seems not so uncommon if Thunderbird/Outlook can handle this.
TIA, Thomas

63
Ok Bruce..
a last question.. so far at least ;-)

There's a comment in the code I don't understand..
In _ProcessGetData() there is
if self._ProcessCopyBinData('+OK')                 ! Don't check for OK, it's checked in Do CopyBinData

I cannot find this Routine !?
TIA, Thomas

64
a desperate follow up..
after the described change to the class I can see the complete first email in the NetDll according to the Log. It breaks out now in the _ProcessCopyBinData method. Here also only a + is in bindata, but changing the p_Correct string to + makes no sense because then the second "Too little data.." with the missing CR Comes into play..
Anybody ?

65
Hello Bruce,
I think I found a possible problem in the NetEmailReceive class. First, I was misslead for a while because in _ProcessList() the Log gives out "NetEmailReceive._ProcessListAll". Here the "All" was confusing me. In my previous send Log this corresponds to line 356.

In my case:
At this time self.packet.bindata contains only a "+" and bindatalen equals to 1 (line 354). Inside _ProcessList() you call self._ProcessSplitReturned(splitStr) <> NET:RET_OKAY which results to false and so _ProcessRaiseError (SplitStr) is called (SplitStr is empty here). This is because inside _ProcessSplitReturned() you accept only "+OK" as a correct answer and thatswhy the return (with an empty error msg) and the following close.

So, now the question what's wrong.. Is "+" a possible correct answer to LIST and not only "+OK" or
did the developers of that POP3 server an error (but i.e. Thunderbird and Outlook can handle it) ?

Temporarely I changed the class code of _ProcessSplitReturned to
if self.packet.BinDataLen = 1
  if self.packet.binData [1] = '+'
    loc:ret = NET:RET_OKAY
  end
else
  if upper (self.packet.binData [1 : 3]) = '+OK'
    loc:ret = NET:RET_OKAY
  end
end
and the process goes on !
Now I can see the 2 emails in the Q and the first email also in the Log. But now it stops with
an error here: (line 523 in NetDemoLog3.txt)

if self.packet.BinDataLen < len (clip (p_Correct))
  self.ErrorTrap ('Too little data retured from ' & self._serverDesc & ' Server. Less than 3 bytes. State = ' &  self._state, 'NetEmailReceive._ProcessCopyBinData')
  self.close()
  return(1)

Please have a look at the attached Logs.. I have no idea whats going on.. maybe a similar prob like the above..
TIA, Thomas

[attachment deleted by admin]

66
meanwhile I got an answer of one of their proggies.. They set the zero bytes in the STAT and LIST answers by default, it has no meaning ATM.. Can this cause the break ?

They said also that the disconnect is originated within my program (NetDemo), also because I can retrieve the emails with Thunderbird without any probs. They have no idea why. Attached the NetDemo.log (shortened) of the affected part of the LIST command, maybe look aroung lines 359, 392, 393.
Do you have an idea ?

[attachment deleted by admin]

67
I'm sorry Bruce for that trouble I make. But this is part of a new certification of my software against the authority of our public (governmental) health system and I'm under pressure...

Meanwhile they gave me a one time certificate for an "outside of process" usage and I could successfully retrieve the pending emails via Thunderbird portable.
So the certificate cannot be the prob, they use JKS, with NT I use PEM, Thunderbird uses PKCS (the last two I converted from the base JKS).

The response mails are formal and of type "message disposition notification" (MDN) according to RFC 3798, thus:  content-type "multipart/report" with report-type "disposition-notification". Are ringing the bells maybe ?  ;D

Ok, I try to debug the classes regarding LIST..

68
I only know it's a Java based system, high secure, non public. I connect to it over a Software component of them which acts as a local email Server and tunnel to their system. I send emails and get an automatically created response email in my mailbox. I sent 2 emails, I got 2 respnses so far. The mails are not touched, have non-zero Content and not marked for deleting. I cannot delete it explicitely by myself, only in a "non UI" process of a POP3 communication (download and delete together; this is part of the protocol of the mother process..).
For every new send mail (works fine) the first retrieve shows zero content of the answer mails.
Any ideas ?
TIA, Thomas

69
Housten, we have a problem !
They looked into the mailbox and confirmed that there are 2 mails waiting and that both have a size > 0 !

So, what can be wrong with STAT or LIST returning non-zero count but zero size ?
TIA, Thomas

70
ahhh...
two email but of zero size !? and maybe thatswhy the break without any error msg ?
Ok, it's time for a suggestion.. NT breaking here with a meaningful error msg ;-)

Now it's their turn to explain why Zero size..
Thnx again Bruce.

71
thnx Bruce for your awesome Support ! Highly appreciated !
Do you have an idea why the communication breaks with or after the "." There should be 2 emails waiting, so this seems to be Ok. (user/pwd/ect grayed out here). TIA Thomas

CONNECTED
 << +OK POP3 server (************) ready

 >> USER *******************

 << +
 << OK

 >> PASS **********************

 << +
 << OK Welcome *********************

 >> STAT

 << +
 << OK 2 0

 >> LIST

 << +
 << OK
1 0
2 0
.

72
Ok, sorry for bore the pants of you Bruce.. ;-)
But can you give me a hint of how to "You can view the "raw conversation" between the demo program and the Email Server".. how or where I can see it please ?
TIA, Thomas

73
yup, I could convert my .jks successfully. I also could send an email to that special email server using a ThisSendEmail object. At least I got no error message, what ever that means..
Their System always answers, so I need to receive their answers via POP3. Here I get now always the following error message:

"Nettalk object error"
A Network communication error has occurred.
Error = The POP (Email) Server returned error =.
Error occurred in function NetMail._ProcessRaiseError

I tried also hte Receive and Emaildontdownloadagain Demo's.. same error.
Any ideas ?
TIA Thomas

74
Thnx Bruce, I'll look for a converter and report back.

75
Hello,
I must send an email via SSL to a SMTP Server. An external request is that I must use a Java keystore file *.jks ! I have no *.pem available and this is also not an option. Username, PWD and keystore file are Ok, because I can open an external Web Config App and doing changes there.
The code is:
--------------------------------------------------------------------------
ThisSend.SSL                 = 1
 ThisSend.SecureEmailStartTLS = 0
 if ThisSend.SSL or ThisSend.SecureEmailStartTLS
   ThisSend.AuthUser     = 'myname'
   ThisSend.AuthPassword = '1234567890'
   ThisSend.SSLCertificateOptions.CertificateFile = ''
   ThisSend.SSLCertificateOptions.PrivateKeyFile = 'D:\somefolder\mailkeystore.jks'
   ThisSend.SSLCertificateOptions.DontVerifyRemoteCertificateWithCARoot = 0
   ThisSend.SSLCertificateOptions.DontVerifyRemoteCertificateCommonName = 0
   ThisSend.SSLCertificateOptions.CARootFile = ''
 end
ThisSend.SetRequiredMessageSize( 0, len( clip( loc:theText)), 0)
 if ThisSend.Error = 0
   if len( clip( loc:theText)) > 0
     ThisSend.MessageText= clip( loc:theText)
   end
   setcursor( CURSOR:WAIT)
   display()
   ThisSend.SendMail( NET:EMailMadeFromPartsMode)
------------------------------------------------------------------
I got the Error -68 "SSL failed to load the CA root file".

So, how to use jks files. Any hints apreciated.
TIA, Thomas

Pages: 1 ... 3 4 [5]