in reply to to send html file content thru mail

Instead of specifying text/plain as the type of the body, specify text/html
  • Comment on Re: to send html file content thru mail

Replies are listed 'Best First'.
Re^2: to send html file content thru mail
by RajNaidu (Novice) on Feb 02, 2010 at 07:21 UTC

    I have specified as follows. my $SUBJECT="hello\n"; print "Subject: $SUBJECT"; print "MIME-Version-1.0"; print "Content-type: text/html", "\n\n"; print "Content-Disposition: inline";

      my $SUBJECT="hello\n"; print "Subject: $SUBJECT"; print "MIME-Version-1.0"; print "Content-type: text/html", "\n\n"; ### THIS IS WRONG print "Content-Disposition: inline";
      As soon as you enter a blank line everything else is viewed as content. Only enter an empty line once at the end of headers. Or, if you are unsure of the MIME standard (or indeed in a hurry), let a module take care of all that for you, http://search.cpan.org/~bbc/Email-MIME-CreateHTML-1.026/lib/Email/MIME/CreateHTML.pm looks like it might do the business for you.

      By the way, did you notice that providing your code facilitated a useful answer, if you need help always show what you have tried.</snark>

      print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."