http://www.perlmonks.org?node_id=168943

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

I am writing a superdat notifier and I would like a reference link on where a person can click and get a file

The link in question is huge:

http://a64.g.akamai.net/7/64/2015/2002-05-22-11-03-36-300/download.nai.com/products/licensed/superdat/english/intel/sdat4204.exe

Obviously I would like a reference to it

This is what I have tried

$msg .= "Network Associates SuperDat: "; $msg .= "<A HREF=" ; $msg .= "$basePage->{exeUrl}"; # this is the huge link $msg .= ">SuperDat"; $msg .= '</A>';

Actually I have tried many things but the same giant line comes up. Forgive my lack of HTML knowledge but what can I do/look at?

Thank you for looking

Originally posted as a Categorized Question.

Replies are listed 'Best First'.
Re: How do I add an href to email?
by CiceroLove (Monk) on May 24, 2002 at 14:29 UTC
    What you are wanting to do is make a multi-part MIME message which is too complicated to go into here. Just google multipart MIME message and there will be all sorts of tutorials for it. Basically, you can't just use HTML tags and hope they work. You have to hold the email clients hand through the whole thing and send boundaries so it knows how to render it. Keep in mind that some people (like me) don't allow HTML formatting in email and I will see the href anyway.
Re: How do I add an href to email?
by Joost (Canon) on Jun 07, 2002 at 11:09 UTC
    1. If you just want to send HTML email (and accept that some clients will not like this at all), you can turn your mail into an html page by stating:
    Content-type: text/html
    In you mail header.

    2. If you want to be more compatible, you might compose an email with different attachments using MIME::Lite - it is (IMHO) the easiest to use module for creating complex messages.

    3. You could also make a CGI script that sits on a short url, gets an id and refers to the longer url, eliminating the need for HTML :-)

Re: How do I add an href to email?
by yoghurt (Initiate) on Jun 05, 2009 at 06:16 UTC
    I don't have an answer but I just want to say that the information is very useful because I've been looking for this also. I will follow your advice and thanks for sharing.

    Originally posted as a Categorized Answer.

Re: How do I add an href to email?
by Marza (Vicar) on May 24, 2002 at 18:37 UTC

    Ahhh that is true! I forgot that we have a couple Unix desktop people as well. Thanks for the advice! and I will look for the suggestions

    Originally posted as a Categorized Answer.