Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^4: html format email

by GordonLim (Acolyte)
on Apr 09, 2013 at 02:26 UTC ( #1027625=note: print w/replies, xml ) Need Help??

in reply to Re^3: html format email
in thread html format email

Hi, Finally I done my table, thank you very much to golux. Below are the script working for me :)
my $data = qq{ Hi All,<br> Currently below are the chassis which is currently being assigned <TABLE cellSpacing=\"0\" cellPadding=\"0\" border=\"1\" align=\"c +enter\"> <TR align=\"center\"><TD>No</TD><TD>version</TD><TD>Chassis</TD><T +D>Assigned</TD><TD>CMMIP1</TD><TD>CMMIP2</TD><TD>CMM1<br>SerialPortCo +nnection</TD><TD>CMM2<br>SerialPortConnection</TD><TD>Ibootbar_Altuse +n</TD></TR> }; # Open db for reading -- but die if there's an error open(INFO, "data.txt")or die "Failed to open 'data.txt' ($!)\n"; # + Open db for reading @array = <INFO>; close (INFO); @ascend=sort(@array); foreach my $line (@ascend){ my($version,$Chassis,$Assigned,$CMMIP1,$CMMIP2,$CMM1SerialPortConn +ection,$CMM1SerialPortConnectionPort,$CMM2SerialPortConnection,$CMM2S +erialPortConnectionPort,$Ibootbar_Altusen) = split(/\|/,$line); $data .= qq{ <TR><TD align=\"center\"> $i </TD><TD> $version </TD><TD> $Chassis </TD><TD> $Assigned </TD><TD> $CMMIP1 </TD><TD> $CMMIP2 </TD><TD> $CMM1SerialPortConnection <h>Port-</h> $CMM1SerialPortConnectionPort </TD><TD> $CMM2SerialPortConnection <h>Port-</h> $CMM2SerialPortConnectionPort </TD><TD> $Ibootbar_Altusen </TD></TR> }; ++$i; } print "DATA:\n $data\n"; my $mime = MIME::Lite->new( 'From' => $sender, 'To' => $email, 'Subject' => $subject, 'Type' => 'text/html', 'Data' => $data, ); $pingStatus = &checkTargetPing(""); if ($pingStatus eq 1) { $smtp = Net::SMTP->new(''); $mime->send() or die "Failed to send mail\n"; $mime->quit; } }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027625]
[oiskuu]: Hm. that depends on kernel compiled with CONFIG_AUDITSYSCAL L
[tye]: apropos my several mentions of audit
[Corion]: At least my (non-SELinux) Debian has that config thing set. I don't have non-Debian machines handy (except Android)
[Corion]: My Android phone also has /proc/self/ loginuid, but that displays -1 (resp. 4GB). That might be because the phone is rooted.
[tye]: -1 means nobody logged in or the process was started before audit got booted
[davido]: ok, on my ubuntu system getlogin grabs from /proc/self/ loginuid (per strace)

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (9)
As of 2017-06-23 19:56 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (554 votes). Check out past polls.