Contributed by Marza on May 24, 2002 at 00:39 UTC
Q&A  > mail and news


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

Answer: How do I add an href to email?
contributed by CiceroLove

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.

Answer: How do I add an href to email?
contributed by Joost

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

Please (register and) log in if you wish to add an answer

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.