Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

PERL, Email and Hyperlinks

by Goldwing (Initiate)
on Apr 16, 2003 at 23:00 UTC ( [id://251079]=perlquestion: print w/replies, xml ) Need Help??

Goldwing has asked for the wisdom of the Perl Monks concerning the following question:

I have written a PERL script that generates a *.log file.

I need to write a PERL script that will create/send an email that contains hyperlinks to the *.log file on our Win2K network?

I was able to use NET::SMTP to generate the email and send it with no problems. When I added a hyperlink to the body of the email, however, I could never get the link to open correctly. (It tried to install QuickTime, go figure.)

Thanks - Any help would be appreciated.

-Goldwing

Replies are listed 'Best First'.
Re: PERL, Email and Hyperlinks
by The Mad Hatter (Priest) on Apr 16, 2003 at 23:07 UTC
    This sounds more like a problem with the mail client than Perl. You might be forming the hyperlink wrong, but I doubt it. For what it's worth, the correct form is
    <a href="URL">text to display</a>
    Also, if you just include the bare URL, most mail clients will linkify it for you.

    Just re-read your post and I don't think Windows style network path names (\\server\share\blah\foo) are supported in HTML hyperlinks.

    Update If you map a drive (say, Q) to the share on network where the log files are located, I am pretty sure you can make valid HTML hyperlinks like this

    <a href="file:///Q|/path/to/log/file.log">log</a>
      Youre right on both counts. It does depend on the mail client, but you may not even need to map a drive. MS outlook will linkify any of the following:

      file:///Q|/path/to/log/file.log (note that the a tag is not necessary)

      file:///server/share/path/to/log/file.log

      \\server\share\path\to\log\file.log

Re: PERL, Email and Hyperlinks
by dws (Chancellor) on Apr 16, 2003 at 23:06 UTC
    Any help would be appreciated.

    Show us a fragment of code that generates links, and show us one of the links that's being generated.

    Also, are your log files available through a web server right now? If not, making URLs for them isn't going to do you much good.

Re: Perl, Email and Hyperlinks
by Goldwing (Initiate) on Apr 17, 2003 at 15:19 UTC
    Thanks to all who responded.
    As it happens, I had a typo in the filename so I was trying to link to a non-existent file. I should be more careful.

    Thanks to BUU, for the correction. I will mind my spelling of perl in the future.
    To the Anonymous Monk who felt it necessary to pile on, I have nothing to say, except, byte me.

    -Goldwing
Re: PERL, Email and Hyperlinks
by BUU (Prior) on Apr 17, 2003 at 03:24 UTC
    (Obligatory Pedantry)

    Perl or perl please.
Re: PERL, Email and Hyperlinks
by Anonymous Monk on Apr 17, 2003 at 13:13 UTC
    It's not spelled PERL. It's Perl. Please, please spell it correctly. For people who work with the language everyday for years, it is very annoying to see that many, MANY people still misspell it. Someone should start a campaign against the misspelling of Perl. How about ... www.spellperlright.org or something like that.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://251079]
Approved by dws
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-10 21:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found