Emailing a file from a FTP server on the Lan side via a Flexy 205


I am using a flexy 205 and need to read a file on a FTP server connected to the LAN side and email out the file through the Flexy. I believe I would use GETFTP , but am a bit confused with how S3 will be setup. The FTP server has a IP address so would I configure S3 as follows: Actual user name:Actual PW@Ip address:port, option?

Also is there a way to email the file directly without saving to the flexy first

Thank You

That’s correct. For example: ftpuser:password@,1

Yes, from the WAN you could use NAT 1:1 or Port Forwarding:

KA Ewon Port Forwarding.pdf (264.2 KB)

You can also use FTP via the VPN connection.

Is there an example of sending a file from an external FTP server through the Flexy email server directly? I do not see al of the parameters listed in the document related to the Cozy. Once I get the Flexy working with proxy or NAT settings is the GETFTP settings the same, which S2 is the save destination on the Flexy - This is unknow to me on how this will send the email out directly. Just a bit confused.

Thank You for any help

FTP and email are completely different and not compatible. You can’t send a file through an email server with FTP. I’m not sure what you are trying to ask.

The Cosy does not have the BASIC IDE so you cannot use GETFTP.

You are mixing FTP with email again. I’m not sure what you are trying to do.

Before you mentioned that there is an FTP server on the Ewon’s LAN. If you are trying to use FTP to get that file from the WAN, you don’t need to use the FTP server on the Flexy. You can use an FTP client on the WAN and use NAT 1:1 or Port forwarding to access the FTP server behind the Ewon. This would work with the Cosy for Flexy.

Sorry for the confusion,

Is there a way to send a file that is on a FTP server through the Flexy email server without saving the file to the Flexy first.


No, you can’t send a file without first having the file on the Flexy.

Thank You for the information


You’re welcome!


So I implemented GETFTP , but I am getting a error connected to FTP server. I am not sure why since I can get to my FTP server that is on the flexy lan side with no issue from a web page and also with FileZilla.
Here is a copy of the code

Here is a copy of the error from the event log
29/04/2021 13:50:36 24003 ftpc-Connect socket failed

Any help is greatly appreciated since I am new to the Flexy.
Thank You

Can you show me the exact settings you are using to get the file with Filezilla? Is it doing FTP without encryption?

Have you tried with Option set to 1 (Passive Mode)?

Can you share the logs from your FTP server?

I use filezilla quick connect

I will get the FTP logs and send

Thank you

Here is the FTP log file. I do not see any entries for today 4/29
u_ex210428.log (40.0 KB)

OK, I wanted to verify if a connection was even opened and it does not look like it was.

I would recommend changing your BASIC code to just do the FTP transfer. Take out the email part for now and see if that works.

Good Morning,

I am still not getting the GETFTP to connect to the FTP server for some reason.
Here is the changes

I trigger the PLC tag CopyFile and run the function CopyFileToEwon. The function does run, but I get FTP-Connect socket failed here is a copy of the log file.

When I change the option from 1 to 0 this is the error I get.

Is there some other setting on the Flexy 205 that I need to setup to get this to work or is there something I am missing in the basic code.


Are you sure that port 21 on the server is available? If you are already connected with Filezilla, for example, the server may not respond because it is busy.

I don’t think you are missing anything on the Flexy. It appears that for some reason the FTP server is not allowing the connection.

I have disconnected filezilla from the FTP server. I did configure port 21 on the FTP server , which is a windows 10 screen connected to the lan side of the Ewon with the PLC processor. I just tried to use the FTP connection in the flexy and removed S3 from the GETFTP function and got the same results.

I am not sure what to try from here since filezilla and a web browser connects correctly to the FTP server.

Any thoughts?

One additional item when I trigger the GETFTP the file I am trying to create is named data1.txt. I do see a file named data.tar that is empty. Not sure what this file is. The file on the FTP server is named Data.txt.


Can you do a test using the planner?

Set up FTP connection here:

Set the planner entry and then click ‘Force’:

Setup as described and getting the same errors. Here is my log for scheduled actions.

I think at this point it may be more efficient for you to call in so that we can help you troubleshoot this over Teamviewer.

We are here from 8-5 EST M-F if you want to call 312-893-5636. We do have meetings scheduled this Monday between 9-12, so you may want to call in the afternoon on Monday.