Sponsored Content
Top Forums UNIX for Dummies Questions & Answers HTML message with attachment (text-file) Post 302135721 by Felix2511 on Wednesday 12th of September 2007 02:59:16 AM
Old 09-12-2007
Thanks Ygor but it doesn't work.
I tried out the following:
LOG=path/test_1.txt

export FROM="Me"
export MAILTO="adress@blablabla.com"
export SUBJECT="Test"
export BODY=$LOG
export ATTACH="path/test.txt"
(
echo "To: $MAILTO"
echo "Subject: $SUBJECT"
echo "MIME-Version: 1.0"
echo 'Content-Type: multipart/mixed; boundary="-q1w2e3r4t5"'
echo
echo '---q1w2e3r4t5'
echo "Content-Type: text/html"
echo "Content-Disposition: inline"
cat $BODY
echo '---q1w2e3r4t5'
echo 'Content-Type: application; name="'$(basename $ATTACH)'"'
echo "Content-Transfer-Encoding: base64"
echo 'Content-Disposition: attachment; filename="'$(basename $ATTACH)'"'
uuencode -m $ATTACH $(basename $ATTACH)
echo '---q1w2e3r4t5--'
) | /usr/sbin/sendmail $MAILTO

It doesn't attach the file but inlcudes it in the mail. It isn't necesary for me to include the file in binary. Any hint? Thank you.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Send an attachment and html text both in the same mail

Hi all, I am working on UNIX (Solaris28). I would like to send an email in which the body will be in html format and, in the same mail, a xls file has to be attached. I have tried this: the file is correctly attached but the body comes as html source and not formatted. If I do not attach the... (4 Replies)
Discussion started by: stefan.yu
4 Replies

2. UNIX for Dummies Questions & Answers

AIX send mail with HTML message body and a binary attachment

I'm trying to script sending an e-mail message on an AIX 5.x server with the following requirements: 1. command line switch to specify file name containing message body in HTML format 2. command line switch to specify file name of a binary attachment 3. command line or input file to specify... (4 Replies)
Discussion started by: G-Man
4 Replies

3. UNIX for Dummies Questions & Answers

How do I extract text only from html file without HTML tag

I have a html file called myfile. If I simply put "cat myfile.html" in UNIX, it shows all the html tags like <a href=r/26><img src="http://www>. But I want to extract only text part. Same problem happens in "type" command in MS-DOS. I know you can do it by opening it in Internet Explorer,... (4 Replies)
Discussion started by: los111
4 Replies

4. Shell Programming and Scripting

Sendmail with html attachment and html body

Hi folks, I have a perl script which sends out email after successful completion of job as inline html, I want to send it out as two parts now as html inline and html attachment. see the attached script. Thanks in advance (1 Reply)
Discussion started by: sol_nov
1 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. Red Hat

Send HTML body and HTML attachment using MUTT command

Hi there.. I need a proper "mutt" command to send a mail with html body and html attachment at a time. Also if possible let me know the other commands to do this task. Please help me.. (2 Replies)
Discussion started by: vickramshetty
2 Replies

7. Shell Programming and Scripting

Emailing html file as body not attachment

Hi All, I want to send the html file as message body not as an attachment. below is my code.it is printing the html code as it is in the email. your help is needed urgently. VTIER=$ROOTHOME/vtierlist2.txt genhtml=/$ROOTHOME/genhtml.html MAILTO=/$ROOTHOME/maillist SUBJECT="Vtier Usage... (6 Replies)
Discussion started by: amitbisht9
6 Replies

8. UNIX for Dummies Questions & Answers

Sending html email with html attachment

Hello, I have a script which is sending an html file as an attachment. #!/usr/bin/ksh export MAILTO="user@company.com" export CONTENT="/usr/tmp/file.html" export SUBJECT="EmailSubject" ( echo "Subject: $SUBJECT" echo "MIME-Version: 1.0" echo "Content-Type: text/html" echo... (0 Replies)
Discussion started by: sreenathkg
0 Replies

9. Shell Programming and Scripting

Sending a csv attachment and html text together.

Hello, I need to send below text (in a file ABC)as html text in mail body and the same as csv attachment 1,2,3 4,5,6 7,8,9 but to send as html text in mailbody we use echo "Subject: Report " | cat - ABC | /usr/lib/sendmail -t a@xyz.com and to send as an attachment in csv format we... (9 Replies)
Discussion started by: skhichi
9 Replies

10. Shell Programming and Scripting

Need syntax for mailing in UNIX by using html file as body and along with attachment

Hi All, I need a syntax for mailing in unix by using html code file output as body and along with attachment (without using mutt command) HTML code file : html1.txt Attachment : attach1.txt I was using the below codes but they are not working. ( cat html1.txt ; uuencode attach1.txt... (4 Replies)
Discussion started by: Rokkesh
4 Replies
TREELINE(1)															       TREELINE(1)

NAME
treeline - an information storage program SYNOPSIS
treeline [qt-options--][infile] treeline [import-option][export-option][misc-options]infile[infile2...] DESCRIPTION
Do you have lots of sticky notes lying around with various useful information jotted down? Or many lists of books, movies, links, website logins, personal contacts, or things to do? Can you find them when you need them? Well, I often couldn't. So here's my answer. Some would call TreeLine an Outliner, others would call it a PIM. Basically, it just stores almost any kind of information. A tree struc- ture makes it easy to keep things organized. And each node in the tree can contain several fields, forming a mini-database. The output for- mat for each node can be defined, and the output can be shown on the screen, printed, or exported to HTML. TreeLine is used to organize and store text data in a tree structure. It is well suited to keeping track of many different types of infor- mation. Each node of the tree can contain several defined fields, forming a mini-database. The format of each node can be defined, and the output can be shown on the screen, printed, or exported to HTML. The tree structure is navigated and edited in the left pane of the window, while various views of the child data are shown and editable in the right pane. The data is stored in XML text files. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the Info files. Qt-options: see Qt documentation for valid Qt options Import-options: --import-tabbed import a tab indented text file --import-table import a tab-delimitted text table, one node per line --import-lines import plain text, one node per line --import-para import plain text, one node per paragraph --import-treepad import a Treepad text-node file --import-xbel import an XML bookmark file in XBEL format --import-mozilla import an html bookmark file in Mozilla format --import-xml import a generic XML file (non-TreeLine format) Export-options: --export-html export a single HTML file --export-dir export HTML in directories --export-xslt export an XSLT file --export-tabbed export a tab indented text file --export-table export a text table of the first children only --export-xbel export an XML bookmark file in XBEL format --export-mozilla export an html bookmark file in Mozilla format --export-xml export a generic XML file (non-TreeLine format) Misc-options: -o, --outfile=FILE output filename, not used with multiple infiles -n, --no-root exclude the root node form the output if applicable --add-header add a header and footer to HTML exports --indent=NUM change the indent amount for HTML exports (default=20) -q, --quiet supress normal status information, only give errors -h, --help display this information and exit No more than one import-option and one export-option may be specified. If either are not present, the native TreeLine file format is assumed. The output filename option can only be specified if there is only one input file. If it is not specified, the input's base file name is used with the appropriate output file extension. If the extensions are the same, an underscore is added before the extension. Note that this avoids overwriting the input file, but other files may be overwritten without notification if they share the output file's name. SEE ALSO
You can find more extensive help about treeline in /usr/share/doc/treeline/README.html AUTHOR
treeline was written by Doug Bell <doug101@bellz.org>. This manual page was written by Miriam Ruiz <little_miry@yahoo.es>, for the Debian project (but may be used by others). enero 3, 2006 TREELINE(1)
All times are GMT -4. The time now is 03:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy