OLAF Posted March 7, 2013 Report Share Posted March 7, 2013 Dear all, I have a strange problem with sending out txt files from an SD card (vision 1040, connection via ethernet to SMTP server): We are writing data into a txt file on an SD card that should then be send out once per week (day....) by mail. This is in principle working fine, has been tested and found to be working. We still get the mails, but with two attachments: the txt file that should be send is empty an extra txt file called "Attachment Validity.txt" is attached with the following content "1) WEEK.txt X ", where WEEK.txt is the name of the original txt file. The file size is less than 2 MB, SI58 is set to 10 (= 10 MB). Is there someone having an idea, what the reason for this problem is? I am a bit lost with this, and our client is expecting more than only empty txt files. So: any idea and help is very welcome! Olaf Quote Link to comment Share on other sites More sharing options...
AlexUT Posted March 7, 2013 Report Share Posted March 7, 2013 Hi Olaf, Validity.txt show you what file had a problem during e-mail transmit. Check if you file not updated when you send it. Check resulting code. Check if a file name for email is valid and located in the folder you mentioned. B.R. Quote Link to comment Share on other sites More sharing options...
OLAF Posted March 7, 2013 Author Report Share Posted March 7, 2013 Thanks for your quick feedback Alex. It is indeed possible that I am writing into the file when being send! I have not been taken care for this. I will make a test on site and will post the result. Olaf Quote Link to comment Share on other sites More sharing options...
OLAF Posted March 8, 2013 Author Report Share Posted March 8, 2013 Hello, I included into the software the condition of not writing into the SD file, while the mail sending is in progress. Still: the same problems occurs: two files are attached, an empty file with the name of the SD file (size on the SD card is about 450 kb) the Attachment validity.txt file The status integer of sending the mail is 521, a number that is not explained in the help file of the VisiLogic software. For the hack, I have changed the value in SI58 from 10 to 1000 and the following mail left correctly, with the SD card file attached to it. I could only try it once and will send in the following days, if it solved now. I am a bit confused by the description of the SI58: "email file attachment size, where 1=1024 bytes ( power-up default is 1) Maximum = 10 (10 MB)"....hope that my 1000 value in SI58 is not causing a different problem Olaf Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.