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


in reply to Inserting a hyperlink

Hi rio, give the hyperlink using HTML tags in the message part and mention the type as "text/html". See as below:

my $message_body = "This is a list of things to bring\n<a href=\"http: +//www.perlmonks.com\">Fresh flowers from Flowershop X</a>\n<a href=\" +http://www.perl.org\">Today's Arragement instructions from instrucito +n home page</a>\n"; ### Add the text message part $msg->attach (Type => 'text/html', Data => $message_body ) or die "Error adding the text message part: $!\n";

Regards,
Velusamy R.


eval"print uc\"\\c$_\""for split'','j)@,/6%@0%2,`e@3!-9v2)/@|6%,53!-9@2~j';

Replies are listed 'Best First'.
Re^2: Inserting a hyperlink
by dorward (Curate) on Nov 22, 2006 at 08:33 UTC

    Don't do that.

    HTML formatted email without a plain text alternative is a strong indicator or spammyness (or at least cluelessness). It is a very good way to get diverted to the spambucket.

    If you must do HTML formatted email, then Email::MIME::CreateHTML is a decent choice, and makes it easy to provide the plain text alternative.