|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Represent the data in table format as in mail content
hi all,
I want to Represent the data in table format in mail content sample data should be like this...but i m trying to send this table to mail using unix command...hw do i do????even i echoed the table contents ...doesnt work.... help me HTML Code:
<table style="background-color:lightblue;"> <tr style="background-color:blue;color:white;"> <th>Component</th><th>Status</th> </tr> <tr> <td>OBj MGR</td><td style="background-color:lightgreen;">Green</td> </tr> <tr> <td>Broker</td><td style="background-color:Red;">Red</td> </tr> </table> |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Code:
<div> <table style="background-color:lightblue;"> <tr style="background-color:blue;color:white;"> <th>Component</th><th>Status</th> </tr> <tr> <td>OBj MGR</td><td style="background-color:lightgreen;">Green</td> </tr> <tr> <td>Broker</td><td style="background-color:Red;">Red</td> </tr> </table> </div> 1. add <div> </div> 2. write to a file, example: report.html As an attachment: Code:
uuencode report.html report.html | /usr/bin/mailx -s 'Report' me@mycompany.com |
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
I tried this. Code:
HTML CONTENT: <html> <head> This is a test report </head> <body> <p> Check this out. </p> <div><table> <th><td>col1</td><td>col2</td></th> <tr><td>data</td><td>test</td></tr> </table></div></body></html> Added this to 1.html Tried sending like this uuencode 1.html 1.html | /bin/mailx -s "Test Report" myname@domain.com All I received is like below Code:
la;sfaui90712349klga; agadf'%&^$adakl;fjad Nothing understood (I intended to say unreadable contents in mail )Please reply |
|
#4
|
||||
|
||||
|
Some possible solutions in this thread...
http://www.unix.com/unix-advanced-ex...x-command.html |
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
@Ygor: Thanks for the link.
The requirement for is little different. Here it is
|
| Sponsored Links | |
|
|
#6
|
||||
|
||||
|
Hi: create a file.html and execute this code Code:
DEST=address@dest.com
CC=address@cc.com
FROM="Sender"
SUBJECT="Subject"
BODY=`cat file.html`
cat << _MAIL_ | /usr/lib/sendmail -F "${FROM}" -f "${FROM}" "${DEST}"
Subject:${SUBJECT}
CC:$CC
Content-Type: text/html;
$BODY
_MAIL_ |
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
@franzpizzo: thanks. But the problem is there is no sendmail in my system.
I am not allowed to install any new utilities as well NEW THREAD: http://www.unix.com/shell-programmin...#post302780843 |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Mailx command - send mail as table format | qwertyu | Shell Programming and Scripting | 2 | 11-29-2012 11:37 AM |
| Help with perl script to output data in table format... | besogon | Shell Programming and Scripting | 3 | 06-04-2012 09:35 AM |
| Perl Script for reading table format data from file. | asak | Shell Programming and Scripting | 3 | 11-25-2011 01:58 AM |
| sending mail using Mailx with data from oracle table | aemunathan | Shell Programming and Scripting | 0 | 04-16-2010 11:11 PM |
| Arrange Data in table and send by mail | xjklop2009 | Shell Programming and Scripting | 4 | 11-28-2009 01:50 PM |
|
|