0

I'm creating a script which generates reports by querying information from various servers. Once the data is generated it does some calculations and creates a HTML output file (let's call it output.html), that I need to send via mailx/mail/sendmail.

Everything's fine till here, but let's suppose there is some more data that is in form of *.csv files. How do I create hyperlinks and link them to some fields (for eg. File1, File2) in output.html file ?

The *.csv files will go as attachments in the same mail which will have output.html as the body.

The mail will be send from a Solaris 10 / RHEL 6 machine and I'm coding using only bash.

Please let me know if some more information is required.

2 Answers 2

2

So you want a hyperlink to the attached files? I don't think you can do that. You would typically either link to a hosted file OR attach it. Hyperlinks need a location to point to, and as an attachment, there isn't a set location to trigger the download/opening.

To link to a hosted file, just place it on your server and do a standard href hyperlink tag:

<a href="www.yoursite.com/files/file1">File 1</a>
Sign up to request clarification or add additional context in comments.

Comments

0
<a href="mailto:[email protected]?Subject=Hello%20again" target="_top"> Contact ME </a>

You need a mail server for sending mail. Use some serverside scripting language like PHP .. for sending mail.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.