raveendu.perl has asked for the wisdom of the Perl Monks concerning the following question:
==============================================================#!/usr/contrib/bin/perl open (HTML, ">/tmp/pperl/index.html"); print HTML "Content-Type: text/html\n\n"; print HTML "<html><head></head><body>"; print HTML "<table border=1>"; print HTML "<tr>"; print HTML "<td width=120 BGCOLOR=#ffff00>Name</td>"; print HTML "<td width=120 BGCOLOR=#ffff00>address</td>"; print HTML "<td width=120 BGCOLOR=#ffff00>number</td>"; print HTML "</tr>\n"; open(INPUTFILE,outfile); open(HTML,">>/tmp/pperl/index.html"); while($line = <INPUTFILE> ) { ($xmit,$dc,$gcd)=split(/,/,$line); print HTML "<tr>"; print HTML "<td>$Name</td>"; print HTML "<td>$address</td>"; print HTML "<td>$number</td>"; print HTML "</tr>"; } close INPUTFILE; print HTML "</table>"; print HTML "</body></html>"; close HTML; ================================================= #!/usr/contrib/bin/perl $to='asmas@xyz.com'; $from= 'asmas@xyz.com'; $subject='First perl HTML Mail test'; open(MAIL, "|/usr/sbin/sendmail -t"); print MAIL "To: $to\n"; print MAIL "From: $from\n"; print MAIL "Subject: $subject\n\n"; print MAIL "Content-type: text/html\n\n"; open(FILE,"/tmp/pperl/index.html"); print MAIL <FILE>; close (FILE); close(MAIL);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Email HTML
by Corion (Patriarch) on Jan 11, 2012 at 13:31 UTC | |
by raveendu.perl (Initiate) on Jan 11, 2012 at 13:37 UTC | |
by Corion (Patriarch) on Jan 11, 2012 at 13:38 UTC | |
|
Re: Email HTML
by Utilitarian (Vicar) on Jan 11, 2012 at 13:36 UTC |