Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

How do I add an href to email?

by Marza (Vicar)
on May 24, 2002 at 00:39 UTC ( #168943=perlquestion: print w/replies, xml ) Need Help??

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:

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 :-)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2021-10-25 07:38 GMT
Find Nodes?
    Voting Booth?
    My first memorable Perl project was:

    Results (89 votes). Check out past polls.