OSCAT Forum

oscat.lib => oscat.lib fuer CoDeSys 3 => Thema gestartet von: brendang am 15. März 2016, 07:22:43

Titel: SMTP_CLIENT Problems
Beitrag von: brendang am 15. März 2016, 07:22:43
Hi

To start, thanks for the great functions.

I am not able to get the SMTP_CLIENT working. The client get stuck at "step = 30" where the program is waiting for "rcv_state = 220". I cant see where the FB creates a connection with the SMTP server. I would expect to see a "snd_test = 'openssl s_client...'" or something like that before you receive the state = 220.

Where does the connection happen?

Thanks
Titel: Re: SMTP_CLIENT Problems
Beitrag von: peewit am 17. März 2016, 20:46:12
which email account you use?
one with SSL / TLS encryption

oscat network smtp_client does not support encryption

https://www.smart-mail.de/
This works even without encryption (and is free)

Titel: Re: SMTP_CLIENT Problems
Beitrag von: brendang am 30. März 2016, 10:26:23
Thanks

I will have a look at it.

Apparently Stunnel will work with Oscat so that I can send to SSL servers.
Titel: Re: SMTP_CLIENT Problems
Beitrag von: learnetk am 14. Juni 2016, 12:53:14
Hi Brendang,
I have the same issue..
Did u succed with sTunnel...Can you please describe how you did that.

Thanks
Titel: Re: SMTP_CLIENT Problems
Beitrag von: Ksanteri am 22. Juni 2016, 14:26:02
Hello!
I'm trying to run SMTP_CLIENT on SoMachine with TM241C241 as CPU.
SMTP_CLIENT returns an errors:
ERROR_T: 1.
ERROR_C: 65280.
I think the problem is in SERVER variable: 'akuankanvarasto%smart-mail.de:aku12354@smtp.smart-mail.de:25'.
Could anyone check the syntax? Peewit?))
I neither was able to send an email with the same email-address (akuankanvarasto@smart-mail.de) by cmd.exe - see attached pictures.
But I'm able to send message by cmd.exe with akuankanvarasto@gmail.com, which is unfortunately SSL encrypted

[gelöscht durch Administrator]
Titel: Re: SMTP_CLIENT Problems
Beitrag von: Ksanteri am 22. Juni 2016, 14:30:46
By the way, Brendang, did you get Stunnel working with OSCAT?
Titel: Re: SMTP_CLIENT Problems
Beitrag von: peewit am 22. Juni 2016, 16:36:03
ERROR_T: 1.              = DNS_CLIENT (use UDP)
ERROR_C: 65280.     = 0x0000FF00   = Receive Timeout

the problem has nothing to do with the SMTP .
probably works no communication

Titel: Re: SMTP_CLIENT Problems
Beitrag von: Ksanteri am 23. Juni 2016, 08:59:27
Thank you Peewit!
I'll check the communication.
Titel: Re: SMTP_CLIENT Problems
Beitrag von: learnetk am 30. Juni 2016, 09:19:43
Hi Ksanteri
Did u get it working ??

Thanks
Titel: Re: SMTP_CLIENT Problems
Beitrag von: Ksanteri am 30. Juni 2016, 09:36:59
Hi learnetk!
Unfortunately I didn't.
It seems to me, as Peewit told, I have a communication problem I am not able to locate. Our local network sees the CPU (it is TM241C241 by Schneider E in my case), but the CPU is not able to connect to DNS server for some reason. I have tried DNS_CLIENT module, but it returns nothing (no mistakes, no results), like there is no connection to internet at all.((
I'm waiting the one person from Schneider E, who is now on vacation, for possible help with the communication problem...
How is it going in your case?
Titel: Re: SMTP_CLIENT Problems
Beitrag von: learnetk am 30. Juni 2016, 14:32:47
Hi Ksanteri,
my case is quite simialar.

If i use the google DNS(8.8.8.8) then i get the same Error Id as you. But if i try using my DNS of my organization its different error Error_C = 16#0000FF00 and Error_T = 16#01.

Please do write if u get a breakthrough
 :)
Titel: Re: SMTP_CLIENT Problems
Beitrag von: Ksanteri am 01. Juli 2016, 06:12:28
Interesting, because I have tried our company DNS-server as well. The error was the same. May I have a look at your program? Can you send me a picture?
Titel: Re: SMTP_CLIENT Problems
Beitrag von: learnetk am 01. Juli 2016, 11:15:13
here are some of the screenshots with various trials. I also tried out the library with my
Raspberry Pi at home, i got a different error Error_T = 5 and Error_C (i forget the step no but i crossed the Step 30).
I tried with the same Pi at my office i get the same old error Error_T = 2 and Error_C =16#FF000000.


[gelöscht durch Administrator]
Titel: Re: SMTP_CLIENT Problems
Beitrag von: Ksanteri am 01. Juli 2016, 11:24:02
Hi learnetk!
Thank you for the pictures!
Peewit, what can you say about those errors?
By the way, learnetk, if I were you, I would change your email account password on something without "%"-mark. It probably could cause SMTP-mistakes I think.
Titel: Re: SMTP_CLIENT Problems
Beitrag von: learnetk am 01. Juli 2016, 12:36:32
Hi,
I changed the password and tried..but the results were the same.
Titel: Re: SMTP_CLIENT Problems
Beitrag von: Ksanteri am 29. August 2016, 07:38:16
Hi,
I changed the password and tried..but the results were the same.
Hi, Learnetk!
After a lot of fruitless attempts I gave up with SMTP_CLIENT and got my system sending mail in other way. In may case this method fits at list.
I make my CPU saving a new string to the logging file on a sd-card whenever I want to send email. Then I used CPU as a FTP-server and make my computer automatically syncronize files between my computer and the CPU with free ftp-client I downloaded from internet and a simple batch file. Than I again set up a free programm monitoring a folder with logging file from the CPU and sending email if the file was renewed.
It is a bit hash, but works.