Need special charecter in email body


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need special charecter in email body
# 1  
Old 07-28-2016
Need special charecter in email body

I have a unix shell script generate.sh that writes to a file hello.txt using redirect.

For example:
Code:
echo " Today's report shows progress by: " > hello.txt

This hello.txt is then send as an email body to the recipients.

My requirement is to have this special characters(up arrow and down arrow key symbol like you can see in the attachmentNeed special charecter in email body-imagespng) in the email.

Last edited by rbatte1; 07-28-2016 at 07:39 AM.. Reason: CODE tags
# 2  
Old 07-28-2016
try sending file as html, use: & # 8593; and & # 8595; (no spaces)
# 3  
Old 07-28-2016
Both the sending and receiving mail system need to understand a unicode character encoding, e.g. UTF-8, to create and interpret the respective char. Use 0x2B83 (hex) or 11139 (dec) to encode the wanted char.
# 4  
Old 07-28-2016
Quote:
Originally Posted by RudiC
Both the sending and receiving mail system need to understand a unicode character encoding, e.g. UTF-8, to create and interpret the respective char. Use 0x2B83 (hex) or 11139 (dec) to encode the wanted char.
While i appreciate your suggestion, I need the syntax for your suggestion that will work on my system ?

Code:
uname -a
SunOS mymac 5.11 11.2 sun4v sparc sun4v

# 5  
Old 07-28-2016
man printf
# 6  
Old 07-28-2016
Here is an example:-
Code:
#!/bin/ksh

{
        print "From: from@domain.com"
        print "To: to@domain.com"
        print "MIME-Version: 1.0"
        print "Content-Type: text/html"
        print "Subject: email subject"
        print "<html>"
        print "<body>"
        print "<p>Today's report shows progress by: 999,999 <b>& # 8595;</b></p>"
        print "</body>"
        print "</html>"
} | /usr/sbin/sendmail -t

Please remove spaces between & # 8595; when you copy.
This User Gave Thanks to Yoda For This Post:
# 7  
Old 07-28-2016
Although this was pretty straight forward ... i swear i went off road looking to get it work. So @Yoda you really helped.

I will test this tomorrow and see if it works.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mutt command email body

Hi Team, While sending the email using the mutt command, mail body not appearing properly and attachment it is showing without line breaks and i used the CSS Style (nowrapper )it is working fine. in this case how to handle the email body, please help me. (1 Reply)
Discussion started by: bmk123
1 Replies

2. Shell Programming and Scripting

If condition fails for special charecter

I have a sample server name listed in variable as below: var="server-13" I need to check if the 7th character on $var is number 1 whichenv=`echo "$var"| head -c 7 | tail -c 1` if ]; then echo "9 found" else echo "9 Not Found" fi Output: This works... (3 Replies)
Discussion started by: mohtashims
3 Replies

3. Shell Programming and Scripting

Message Body while sending an email

I am making use of the following code to display the results of my txt file in an email: mail -s 'Count Validation Test Comparison Results' Ronit@XYZ.com < Count_Validation_Results_`date +%m%d%Y`.txt Email Output: ----------Query 1 Count Validation Results-------- Source count is 4 Target... (7 Replies)
Discussion started by: ronitreddy
7 Replies

4. Shell Programming and Scripting

issue with Email Body

Hi, I have written shell program to send email as below - #!/bin/ksh filename=`ls -ltrh *.Z` echo $filename |mailx -s "FOR TESTING" rahul.b@infotech.net I am getting the email but email body is - -rw-rw-r-- 1 bahulra dba 173M Mar 22 04:37 corphist.txt.Z -rw-rw-r-- 1 bahulra dba 107M... (3 Replies)
Discussion started by: rahulbahulekar
3 Replies

5. Shell Programming and Scripting

Crontab issue: getting email but with out body

I have a oracle sh script test.sh #!/bin/bash R=`sqlplus -S *****/*********@dfsdf <<ENDOFSQL set serveroutput on size unlimited; execute DBMS_SNAPSHOT.REFRESH( '"MIS_ADMIN"."MV_SURVEY_UNITS_CENSUS"','F'); execute DBMS_SNAPSHOT.REFRESH( '"MIS_ADMIN"."MV_SURVEY_UNITS_CENSUS_PART"','F');... (1 Reply)
Discussion started by: ramkia6
1 Replies

6. UNIX for Dummies Questions & Answers

Sending email with attachment and body

Hi I want to able to attach a file to a email and send it with a body the body of the email is within the "body" file, and the attachment in "atch" if i send like below it will send the email correctly /usr/sbin/sendmail me@you.com< body And when i send the attachment alone... (3 Replies)
Discussion started by: sridanu
3 Replies

7. Shell Programming and Scripting

The body of the Email -- mailx

Hi, I am using mailx command to send an email and i took the body of the email from a file, mailx -r gtt.org -s "Status Report " ss@org.com < $ProcessStatisticsFile but now i want to declare the body of the email in the command itself. I have tried with the following command but... (4 Replies)
Discussion started by: chinnu01
4 Replies

8. Shell Programming and Scripting

emailing as body of email

hi all, how do i email a file in the body of an email rather than as an attachment ?? have a ksh script which i need to read a file and email as part of the body rather than an attachment. my code is : uuencode file.log | mailx -s "test" but this sends file as an attachment. ... (2 Replies)
Discussion started by: cesarNZ
2 Replies

9. Shell Programming and Scripting

how to check body of the email

Dears, i have user called dellsh i hope to make this script when this user recieve email check the budy of the email about (StatusRequest) when i find this email contain this subject run crontab do this job (create file in my home directory called index) thanks for your attention (1 Reply)
Discussion started by: dellsh
1 Replies

10. Shell Programming and Scripting

Comapring files charecter by charecter using AWK/Shell Script

Hi... I have a requrement to compare two files. for e.g. File 1 2007/08/19 09:48:10 DH-032 $APTA1: Device AATD8029 2007/08/19 09:48:10 DH-045 $APTA1: Device AATD8029 2007/08/19 09:48:10 DH-043 $APTA1: Device AATD8029 File 2 2007-08-19 09:48:10 DH-032... (1 Reply)
Discussion started by: evvander
1 Replies
Login or Register to Ask a Question