Hi All,
I want to send mail thru perl. And the content is supposed to have hyperlink. Just one word lke, "FAQ" is supposed to have link to some url.
I am trying like this, but I am not getting hyperlink on word FAQ.
Can any one help here ?
Thank You.
sub send_mail { my ($to_email, $subject, $message) = @_;
open(MAIL, "|/bin/mailx -t"); print MAIL <<"EOM"; To: $to_email from: [EMAIL PROTECTED] Subject: $subject EOM print MAIL "\n$message\n"; print MAIL "\n For questions about OnTrac,please contact Product Information or review our <a href="http://pubsys.pearsoned.com/groups/product_information/OnTrac/ontrac_f aq.html">FAQ</a>" ; \n" ; close MAIL; return 0; }
You have not set a proper mime/type for the email client to recognize that the message is HTML, assuming it can. This is only one of the problems with sending mail in this manner, 1. as HTML, 2. as a piped in message on the command line.
If you are going to send HTMLized e-mail, then do it properly. If you are going to do it properly, you are definitely going to want to use a module that will do it properly for you. There are lots of them available. And you will most likely need to read tutorials on how to send HTML mail.
http://danconia.org
[snip annoying pointless disclaimer]
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>