Sponsored Content
Top Forums Shell Programming and Scripting Sending mail from UNIX in courier font Post 302837683 by ajayram_arya on Friday 26th of July 2013 11:55:24 AM
Old 07-26-2013
Code Sending mail from UNIX in courier font

Need assistance . I have a cvs file which i changed to html file but when i try to send mail to outlook its indent goes wrong. any idea is appreciated .

below are some commands i tried using

Converting csv to html
Code:
#!/bin/sh
nawk 'BEGIN{
FS=","
print  "MIME-Version: 1.0"
print  "Content-Type: text/html; charset="us-ascii""
print  "Content-Disposition: inline"
print  "<HTML>"
print  "<BODY>"
}
 {
print  "<P>"
print  "<FONT SIZE="5" FACE="Courier">"
printf "<TR>"
for(i=1;i<=NF;i++)
printf "%s", $i
print "</TR>"
print "</FONT>"
print  "<P>"
 }
END{
print "</BODY></HTML>"
 }
' TempTwo > file1.html

Code:
uuencode file.html file.html|mailx -s "<subject>" sample@mail.xom
cat file.html | mailx -s "<subject>" sample@mail.xom

Code:
Daily Temp           Temperature      |  Degree Day
Forecast Date  Max Dev Min Dev Avg Dev HDD NDD CDD NDD
Today  Jul 23   85  -6  72   2  79  -2   0   0  14  16
       Jul 24   87  -4  73   3  80  -1   0   0  15  16
       Jul 25   89  -2  71   1  80  -1   0   0  15  16

After mail was sent

Code:
Daily Temp           Temperature      |  Degree Day
Forecast Date  Max Dev Min Dev Avg Dev HDD NDD CDD NDD
Today    Jul 23   85  -6   72   2    79  -2    0     0    14   16
            Jul 24   87  -4   73   3    80  -1    0     0    15   16
            Jul 25   89  -2   71   1    80  -1    0     0    15   16

 

10 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

font courier doesn't seem to work for me

font courier doesn't seem to work for me -- I get this when I try to use it: font courier doesn't seem to work for me (6 Replies)
Discussion started by: ropers
6 Replies

2. Shell Programming and Scripting

Sending Mail Thru Unix Script

What are all the things that should be configured in order to send a mail from Unix box. An eg. program of sending a mail will help me a lot!!!!!! Thanks in advance -Om (5 Replies)
Discussion started by: Omkumar
5 Replies

3. HP-UX

How to change font and colour in mail sent from Unix

Dear All, We have following code to send mails from unix to users. We want to see few sentences of mail in bold font or to hightlight few lines in different colours. Could you please let me know how can we do it in function construct_body. ... (3 Replies)
Discussion started by: yogichavan
3 Replies

4. UNIX for Dummies Questions & Answers

Sending mail thu unix

Hello everybody. Is it possible in unix to send a mail to my acount like (abcd@xyz.com) if yes then how ?? Thank You !! (6 Replies)
Discussion started by: hellotosatish
6 Replies

5. UNIX for Dummies Questions & Answers

sending mail from unix is failing

i am sending mails from my unix server to my mail id i used sendmail option previously it ran successfully now it is not sending mails what might be the problem this is the message i am getting in /var/mail/abcdev file how to rectify this? ----- The following addresses had permanent... (1 Reply)
Discussion started by: trichyselva
1 Replies

6. Programming

Sending mail in C/C++ in unix server

Hi Frnds, I have a task in my project wherein i have to send out a mail from my C++ code.With some file attachements.Please help me in this. At a higher level wat i can tell is my code generated 3 csv file and i have to send these files as attachement. My code is executed in unix... (6 Replies)
Discussion started by: electroon
6 Replies

7. UNIX for Dummies Questions & Answers

sending mail from unix

Hi, I am using mailx command to send mail through Unix. But I am able to send mail only within my domain. If i want to send mail to some other server, it's not working. Like say If I want to send mail to someone on gmail or yahoo it's not working. but it's working fine within my company domain.... (3 Replies)
Discussion started by: anki_1
3 Replies

8. Shell Programming and Scripting

Sending mail in unix

Dear Friends, I have a shell script where the mail is being sent like this: /usr/lib/sendmail -v ${CPA_ADMIN} CPA_ADMIN="xx@abc.com" Can we specify more than one email ids in this variable? Is ther eany limit to the number of email ids I can specify in this variable, to whom the mail... (3 Replies)
Discussion started by: Radhe
3 Replies

9. Shell Programming and Scripting

Font change in unix while sending email

Hi, I know that we would be require HTML to change the font and color of the text of the output, if we wnt to send that through the email. But I have managed to get below code, can someone look into it and let me know if i can acheive my requirement through this kind of code: Following can... (9 Replies)
Discussion started by: amit.mathur08
9 Replies

10. UNIX for Dummies Questions & Answers

Sending e-mail from unix

Hello, I want to send an email from unix. I tried following commands: mailx -s "hello" manish.xxx@xxx.com < echo_manish and echo "Testing Mail" | mailx -s "hello" manish.xxx@xxx.com but in both the commands nothing is happening. I mean it is neither giving any error nor I am receiving... (7 Replies)
Discussion started by: manishdivs
7 Replies
WWW::Topica::Mail(3pm)					User Contributed Perl Documentation				    WWW::Topica::Mail(3pm)

NAME
WWW::Topica::Mail - parse a single Topica mailing list mail SYNOPSIS
my $index = WWW::Topic::Index->new($index_html); foreach my $mess_id ($index->message_ids) { # the mail has some information and also provides a link to the reply ... my $mail = WWW::Topica::Mail->new($topica->fetch_mail($mess_id), $mess_id); # which has other information (like the un-htmled mail and the email address) ... my $reply = WWW::Topica::Reply->new($topica->fetch_reply($mail->id, $mail->eto), $mail->id, $mail->eto); } print "Next offset is ".$index->next." "; print "Previous offset is ".$index->prev." "; DESCRIPTION
Used to parse a single message page from Topica.com's mailing list indexes. Message pages have the subject and the date and time of the mail being sent as well as a full name of each sender. METHODS
new <page html> <id> Takes the page html and the message-id and parses the html. parse <html> Parse the html to get message ids and next & prev offsets. id Get the id of this mail eto Get the eto of the next reply we need to get date Get the date of this mail subject The subject of the mail from Get the name of the person it was from body Get the body of the mail. AUTHOR
Simon Wistow <simon@thegestalt.org> COPYRIGHT
Copyright (c) 2004, Simon Wistow perl v5.10.1 2006-01-03 WWW::Topica::Mail(3pm)
All times are GMT -4. The time now is 07:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy