Common Issue: Table to be displayed in mail content and not as an attachment


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Common Issue: Table to be displayed in mail content and not as an attachment
# 8  
Old 03-15-2013
I did that.!! No use!
# 9  
Old 03-15-2013
Quote:
Originally Posted by PikK45
I did that.!! No use!
What do you mean by "No Use!". Tell us what exactly is the issue that you are facing?

For testing, try this code and see if you are getting a formatted email:
Code:
{
        echo "<html>"
        echo "<body>"
        echo "<table border=1 cellspacing=0 cellpadding=3>"
        echo "<tr>"
        echo "<td align=center><font face=verdana size=2 color=#FF0000>PikK45</font></td>"
        echo "</tr>"
        echo "</table>"
        echo "</body>"
        echo "</html>"
} | mailx -m -s "Test HTML
Content-type: text/html" user@domain.com

Put it in a file, change the recipient address and run it.
This User Gave Thanks to Yoda For This Post:
# 10  
Old 03-15-2013
Please show us exactly what you did do then, word for word, letter for letter, keystroke for keystroke, so that we won't suggest things you've already done again.
# 11  
Old 03-15-2013
@Yoda, Corona688: Sorry that I did not give you enough details.

I tried Yoda's test script and it was successful. But when I tried last time, I guess I should have done some silly mistakes.

Anyway, Yoda saved me this time Smilie Smilie
# 12  
Old 03-15-2013
Yes, you can do many neat things overloading the mailx -s / Subject: line into mime directives, like importance.
# 13  
Old 03-15-2013
Hi PiKK, I have Recently worked on such an requirement. In this case u have to spool a file from the database using any colsep( set colsep ".") Then embed those data with html tags into an html file. Then need to send that html file as the content.

If things are not clear i can write a dummy code for you.
# 14  
Old 03-16-2013
@Showdown: Thanks for your concern. That's what I did exactly Smilie
@DGPickett: Is there any example of overloading that mailx's subject line??

Can you offer me examples or a link that has it?
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Facing issues with Content-Type:application/x-download Content-Disposition:attachment

I am in the process of developing a perl cgi page. I had succeeded in developing the page but there are few errors/issues with the page. description about cgi page: My CGI page retrieves all the file names from an directory and displays the files in drop down menu for downloading the... (5 Replies)
Discussion started by: scriptscript
5 Replies

2. Shell Programming and Scripting

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 <table style="background-color:lightblue;">... (8 Replies)
Discussion started by: navsan
8 Replies

3. Shell Programming and Scripting

Help with duplicate common data content

Input file: #data_131 0 >content..._* 1 >content..._at_+/97.20% #data_137 0 >content..._* 1 >content..._at_+/97.20% 2 >seq..._* 3 >content..._at_+/97.20% 4 >content..._at_+/97.20% #data_141 0 >content..._* #data_150 0 >content..._* 1 >content..._at_+/97.20% 2 >seq..._* 3... (3 Replies)
Discussion started by: perl_beginner
3 Replies

4. Shell Programming and Scripting

Format of content displayed in the attachment of email

Hi, I'm facing a problem in mailing attachments using uuencode in mailx. I got to attach a couple of flatfiles. I'm able to attach and mail the files successfully. But there is a problem in the format of the flatfiles when they are received as an attachemnt. For Example : Consider... (0 Replies)
Discussion started by: Sindhuap
0 Replies

5. UNIX for Dummies Questions & Answers

How to send html file in a mail not as an attachment but it should display in the mail in table for

Hi The below script working when we are sending the html as attachment can u please guide how to send thesmae data in table form direct in the mail and not in mail attachment . cat Employee.sql SET VERIFY OFF SET PAGESIZE 200 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON - HEAD... (0 Replies)
Discussion started by: mani_isha
0 Replies

6. Shell Programming and Scripting

Issue with mail attachment

Hi Unix Gurus, Need your help regarding a weird issue that I'm facing. I have an automated unix script that sends out PGP encrypted reports/feeds to our users as mail attahments. Every thing has been going well and all the users have no issues except one, who instead of getting the attachment,... (1 Reply)
Discussion started by: arunsoman80
1 Replies

7. UNIX for Dummies Questions & Answers

Issue on sending a mail with attachment using unix script ?

Issue on sending a mail with attachment using unix script ? Below is my code and is working fine and there is a issue in the attachment, the attachment file printing as a text-encripted message in the mail draft box instead of putting as a attachment (cat $msg; uuencode $attach1 in1.txt ;... (2 Replies)
Discussion started by: gksenthilkumar
2 Replies

8. Solaris

Comparing the common columns of a table in two files

Hi, I have two text files.The first and the 2nd file have data in the same format For e.g. The first file has BOOKS COUNT: 40 BOOKS AUTHOR1 SUM:1018 MAX:47 MIN:1 AVG:25.45 BOOKS AUTHOR3 SUM:181 MAX:48 MIN:3 AVG:18.1 Note:Read it as Table columnname sum(column) max(column) min(column)... (1 Reply)
Discussion started by: ragavhere
1 Replies

9. UNIX for Advanced & Expert Users

mailx commannd - Mail and Attachment in same mail

Hi , I am using mailx command for sending the mails. Rightnow I am sending the attachment (by using uuencode $filename) as a seperate mail.I wanna send the attachment also with the same mail. (6 Replies)
Discussion started by: sharif
6 Replies
Login or Register to Ask a Question