blrooke

Email multiple files

Recommended Posts

Hello

I am currently logging hourly data files from instruments at a remote site. I would like to have them emailed to me on a daily basis. The script would follow a similar manner to that explained for daily data files but I would have to attach the previous 23 logging files along with them.

Is there an easy way to do this? Please be patient I am new to the DF software.

Braden

Share this post


Link to post
Share on other sites

You can only attach one file at a time, so set the attachment, call email.send(), wait 30 seconds for it to send, then do it again for the next file. Or, optionally, get winzip with the command line tool, call the tool from script using system.shellexecute(), then email the zipped file.

Share this post


Link to post
Share on other sites

Sorry my email settings must not be set to notify me when you reply.

Is there a way to automate calling winzip and emailing the single zipped file of 24 csv files? I've poked around and can't seem to find any application examples

Share this post


Link to post
Share on other sites

There aren't any examples that I know of. First you have to buy WinZip. That way you get access to their command line tool. Then you need to figure out what the command line should be. Then just do system.shellexecute("whatever the command line is") from DAQFactory. I believe you'll have to delay in script long enough to allow it to run to completion before emailing.

Share this post


Link to post
Share on other sites

Hi Guru,

 

  Any chance DAQFactory can now attach multiple files?  If not, is this in the plans to add as a feature?  I have to send an email via DAQFactory and would like to have up to 4 csv files attached and only have a single email, and not have to unzip the files once received as my outlook rules/script automatically downloads them as they arrive.

 

Thanks in advance

Share this post


Link to post
Share on other sites

No change.  You should post to the Feature Request forum.

 

But, the latest release does allow you to use objects for email instead of a single global object.  This means you could create 4 objects and in 4 separate sequences send 4 emails at the same time with a different file.  It'd still send 4 emails, but you wouldn't have to wait between sends.

Share this post


Link to post
Share on other sites

Instead of buying WinZip, how about using one of the plentifull freeware archive tools such as 7zip. The command line is free and the compression ratio is even better than with the WinZip.

Share this post


Link to post
Share on other sites

Actually, The brilliant folks at Azeotech have updated the software to now include multiple attachments in a single email, so my problem has been solved.  This was part of the release for version 16.1.  I did not want any type of zipped file since that's one more step on the backend to download and uncompress, etc.  This has allowed me to keep everything with the single platform rather than trying to incorporate multiple pieces of software to accomplish what I need.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now