06-28-2013
Quote:
Originally Posted by
Jewel
but i am getting blank file now . can you please suggest for this
The script should work after changing the encoding. Make sure the file that you are attaching is in the path where you are running this script.
You can also set
xtrace/
verbose and check what is happening.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. AIX
I apoligize for the cross-post but I'm not getting much in the way of help in the dummies forum:
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... (3 Replies)
Discussion started by: G-Man
3 Replies
3. Shell Programming and Scripting
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
4. Red Hat
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
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
I have an HTML file I am currently sending in the body of an email. I now have a need to send a csv attachment along with it. I can ONLY use sendmail as mutt and xmail etc are not on the server.
Here is what I am currently using: It is possible to add code to add an attachment ??!?
{
... (8 Replies)
Discussion started by: atelford
8 Replies
7. UNIX for Advanced & Expert Users
Hi all:
Been racking my brain on this for the last couple of days and what has been most frustrating is that this is the last piece I need to complete a project.
There are numerous posts discussing mutt in this forum and others but I have been unable to find similar issues.
Running with... (1 Reply)
Discussion started by: raggmopp
1 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I was working on getting an HTML file in the mail body along with attaching a "csv" file to the mail.
Below are the 2 parts of the code.
I need help with the second part where I'm sending the mail. The HTML file as an attachment is perfect without any issues and with proper formatting.... (6 Replies)
Discussion started by: aster007
6 Replies
9. Shell Programming and Scripting
Hi,
I am having trouble in sending a mail with html body and attachment (csv file). We don't have uuencode or mutt (not allowed to install as well)
The below code is perfectly working for sending the html body alone:
export MAILTO=abc@xyz.com
export CONTENT="/home/abc/list.html"... (2 Replies)
Discussion started by: close2jay
2 Replies
10. Shell Programming and Scripting
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
encoding(n) Tcl Built-In Commands encoding(n)
__________________________________________________________________________________________________________________________________________________
NAME
encoding - Manipulate encodings
SYNOPSIS
encoding option ?arg arg ...?
_________________________________________________________________
INTRODUCTION
Strings in Tcl are encoded using 16-bit Unicode characters. Different operating system interfaces or applications may generate strings in
other encodings such as Shift-JIS. The encoding command helps to bridge the gap between Unicode and these other formats.
DESCRIPTION
Performs one of several encoding related operations, depending on option. The legal options are:
encoding convertfrom ?encoding? data
Convert data to Unicode from the specified encoding. The characters in data are treated as binary data where the lower 8-bits of
each character is taken as a single byte. The resulting sequence of bytes is treated as a string in the specified encoding. If
encoding is not specified, the current system encoding is used.
encoding convertto ?encoding? string
Convert string from Unicode to the specified encoding. The result is a sequence of bytes that represents the converted string.
Each byte is stored in the lower 8-bits of a Unicode character. If encoding is not specified, the current system encoding is used.
encoding dirs ?directoryList?
Tcl can load encoding data files from the file system that describe additional encodings for it to work with. This command sets the |
search path for *.enc encoding data files to the list of directories directoryList. If directoryList is omitted then the command |
returns the current list of directories that make up the search path. It is an error for directoryList to not be a valid list. If, |
when a search for an encoding data file is happening, an element in directoryList does not refer to a readable, searchable direc- |
tory, that element is ignored.
encoding names
Returns a list containing the names of all of the encodings that are currently available.
encoding system ?encoding?
Set the system encoding to encoding. If encoding is omitted then the command returns the current system encoding. The system encod-
ing is used whenever Tcl passes strings to system calls.
EXAMPLE
It is common practice to write script files using a text editor that produces output in the euc-jp encoding, which represents the ASCII
characters as singe bytes and Japanese characters as two bytes. This makes it easy to embed literal strings that correspond to non-ASCII
characters by simply typing the strings in place in the script. However, because the source command always reads files using the current
system encoding, Tcl will only source such files correctly when the encoding used to write the file is the same. This tends not to be true
in an internationalized setting. For example, if such a file was sourced in North America (where the ISO8859-1 is normally used), each
byte in the file would be treated as a separate character that maps to the 00 page in Unicode. The resulting Tcl strings will not contain
the expected Japanese characters. Instead, they will contain a sequence of Latin-1 characters that correspond to the bytes of the original
string. The encoding command can be used to convert this string to the expected Japanese Unicode characters. For example,
set s [encoding convertfrom euc-jp "xA4xCF"]
would return the Unicode string "u306F", which is the Hiragana letter HA.
SEE ALSO
Tcl_GetEncoding(3)
KEYWORDS
encoding
Tcl 8.1 encoding(n)