Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

publish email to website 1

Status
Not open for further replies.

dwcasey

MIS
Oct 31, 2002
179
US
Not sure if this is the right forum, but here goes...I have a unix script that polls some servers for failed backups, then writes that data to a file as well as email the file out.

Is there a way for me to send this file or email to a webserver for publishing?

I guess the simplest would be to NFS mount or FTP the file over each time. In that case, how could I give it some HTML formatting?

What about emailing the file to a user that is scripted to listen for and publish to website? Anyone hear of something like this being done?
 
If the file is readable by email, it should also be readable on the website (.txt/.pdf/.dat) etc. All you need to do is get the files to a web folder.
 
Hi

dwcasey said:
I guess the simplest would be to NFS mount or FTP the file over each time.
If you already have an HTTP server set up, you could send that file through... HTTP. The LWP module of [tt]perl[/tt] usually comes with command-line tools [tt]POST[/tt] or [tt]lwp-request[/tt], which can be easily used to upload the file from a shell script.
dwcasey said:
In that case, how could I give it some HTML formatting?
Not necessarily. You could upload it as it is, then format it with a CGI script when is requested.

Feherke.
 
dwcasey said:
What about emailing the file to a user that is scripted to listen for and publish to website? Anyone hear of something like this being done?

This is very simple to do by setting up an alias in /etc/aliases that simply redirects the email content to a script.

Annihilannic.
 
You could also use txt2html, google for the script loads about.

Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top