Forum Moderators: coopster & phranque

Message Too Old, No Replies

Automatically attaching a file to an email

some people are just slack

         

justa

5:07 am on Dec 12, 2001 (gmt 0)

10+ Year Member



Okay,

Everyday a file, everyday.dat, needs to be emailed to the CIO's. The file is always called everyday.dat, and is always found in the same place on the server.

Is it possible to set an email link on a page to send an email to CIO's address and attach everyday.dat?

I told them they could put a mailto: and then attach the file from the email and send, but thats a bit too much work.

Any help is appreciated.

Justa.

joshie76

10:51 am on Dec 12, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you have an ASP environment you can use the CDONTS NewMail object.

This allows you to create an e-mail (on the server) and attach files to it. You can then set this up to be sent through interaction with a page on a server (i.e. by simply calling it). These resources should help you:

[powerasp.com...]
[devguru.com...]

You can almost certainly do this with other server-side scripting technologies too. Somebody else here can probably fill you in on the Perl, CGI options etc.

Brett_Tabke

7:38 pm on Dec 16, 2001 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



If you are on a Unix box with Cron support, why not just email it via a simple cron? There are quite a few simple mailers out there for just this sort of "timed" thing. Or, if they don't mind viewing a web page, a very simple cgi could do the mailing.

txbakers

10:53 pm on Dec 17, 2001 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I found a very good form-email Perl script which will attach an e-mail. If you set up the form and make the value of the "FILE" input everyday.dat (with the path) all you would need to do is to submit the form every day (no boxes to fill out) and it will be mailed.