Sponsored Content
Full Discussion: Send mail with font change
Top Forums UNIX for Beginners Questions & Answers Send mail with font change Post 303037186 by bakunin on Thursday 25th of July 2019 12:18:50 PM
Old 07-25-2019
A "mail" is basically a (raw) text document, like an ASCII file. You cannot "format" it with markup.

There is the MIME standard that allows mail to contain (several) parts which are not text. This nowadays is regularly used to send mail in HTML format, with embedded pictures and even embedded scripts (like Javascript, ...). This in fact is why mail became so dangerous in the last years: the possibility to send executable code and all sorts of possibly malign parts in a mail along with mail client programs (Outlook foremost) which executes everything sent to it automatically to make life for the user more "comfortable".

Correctly configured mail programs convert every mail from any format (HTML, rich text format, ...) into simple ASCII and will not execute any code at all. True, it won't look as dazzling, but if you have information to get across instead of presentation you will appreciate the riskless and non-dangerous property of this way.

Bottom line: As you need to change the text of your mail anyway (converting it to HTML means adding HTML tags which also changes the text) you should consider simpler ways to let certain lines stand out, i.e.:

Code:
------------------------------------------------------------

Job Name:       ABC
Start Time:     07/20/2019 07:32:39
End Time:       07/20/2019 07:32:42
Status:         SUCCESS 07/20/2019 07:32:42

------------------------------------------------------------

Job Name:       DEF
Start Time:     07/20/2019 07:32:19
End Time:       07/20/2019 07:32:21
---> Status:         FAILURE 07/20/2019 07:30:26
Status:         SUCCESS 07/20/2019 07:32:21

------------------------------------------------------------

Job Name:       GHI
Start Time:     07/20/2019 07:30:06
End Time:       07/20/2019 07:30:08
Status:         SUCCESS 07/20/2019 07:30:08

------------------------------------------------------------

Which is simple and does the same - let the important line stand out.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
 

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

change the font size in bash

Hi, I would like to change the font size in bash. I know how do it in ksh: F_VDOBLE="\033#6" print "${F_VDOBLE}Esto es..." But in bash I don't know Could you help me please? Many thanks! (5 Replies)
Discussion started by: mierdatuti
5 Replies

3. 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

4. Shell Programming and Scripting

how to change font in mailx

I am writing sql reports to an oracle database, spooling them to a file and emailing them with mailx. I use the syntax below. The reports do not format properly, unless I use the Courier New font. How do I set this with mailx? mailx -s "MY REPORT, `date +'%D %r` " -r "REPORTING SYSTEM"... (2 Replies)
Discussion started by: guessingo
2 Replies

5. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

6. Ubuntu

Not able to send mail out of UbuntuBox in send mail

Hi Guys.. yesterday i purchased a VPS server and installed sendmail on ubuntu 12.4 with Webmin & Apache runing webserver problem is.. i can send mail via webmin user interface account to anybody to out side to any domain and able to recieve any mail from any domain.. Now main... (2 Replies)
Discussion started by: cmdman
2 Replies

7. Programming

Change font in Motif

Does anyone know how to change the font size into a larger one, in a basic Motif application? (1 Reply)
Discussion started by: JenniferKuiper
1 Replies

8. UNIX for Dummies Questions & Answers

Change font

how do i change from employee= to employee= in ksh. in my shell script, i just want to employee= to BOLD. (3 Replies)
Discussion started by: lawsongeek
3 Replies

9. Shell Programming and Scripting

Send mail with font color change

Hi All, I have a file that contains following entries. I want to highlight the line that has word as "FAILURE" while sending the email. File ------------------------------------------------------------ Job Name: ABC Start Time: 07/20/2019 07:32:39 End Time: 07/20/2019... (4 Replies)
Discussion started by: sdosanjh
4 Replies

10. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies
capsar(1)						      General Commands Manual							 capsar(1)

Name
       capsar - prepares documents not in ASCII format for transport in the mail system

Syntax
       capsar [-c] [-t] [-x[hTD]] [file]

Description
       The  utility  allows  ULTRIX mail to support documents containing non-ASCII data, such as DDIF.	Only the DDIF and DOTS data types are cur-
       rently supported.  DDIF is Digital's standard format for document interchange. DOTS is an encapsulation of the encoded interchange form	of
       a number of related data objects into a single composite object.  For more information, see and

       The utility prepares a DOTS file or a DDIF document for transport in the mail system by performing the following steps:

       1)    The DDIF document is converted to DOTS format.  As a DDIF document may contain more than one file, all files within the DDIF document
	     are incorporated into one DOTS file which can be sent as one mail message.

       2)    Each DOTS file is then compressed and encoded using only printing ASCII characters.   This is because ULTRIX mail software only  sup-
	     ports 7 bit mail.

       3)    The  routine  encapsulates  coded	documents by adding leading and trailing lines, each surrounded by a <CR>.  The lines should begin
	     with 2 or more dashes (-) and some text that indicates the nature of the encapsulated message. The following is  a  typical  encapsu-
	     lated mail message:
	     To: anybody@anynode
	     Cc:
	     Subject: Another DDIF document

	     -----------motd.ddif : DOTS.ctod.compress.uuencode message

	     begin 0 motd.ddif
	     M__]@*" ,(" !BO.#P$# 8$* &UO=&0N9&1I9H0$)%546     "A@"B !@8K
	     MS@ P$''T1$248M96YC;V1E9"!R979I<V%B;&4@9&]C=6UE;G2@@/__?X"@
	     M@( ! 8$! ((/1$1)1B1?4D5!1%]415A4HX#)% !$1$E&(%1E>'0@1G)O;G0@

	     end

	     -----------End of motd.ddif : DOTS.ctod.compress.uuencode message
	     The command can also extract different parts of a mail message, namely, the header information, the text part of the message, and the
	     DOTS file that was encapsulated as described above.

       Extracting the DOTS file is done by parsing the mail message and detecting the leading and trailing encapsulation boundaries.  Decoding and
       uncompressing the data results in the original DOTS file.

       The utility is built into Rand MH to provide DDIF mail support.	It can, however, be used with mail.

Options
       -c   Causes to create an encapsulated DOTS bodypart from file. The file must be a DOTS/DDIF type document.

       -t   Causes to write to the standard output the message type of file. Message type can be either text or DOTS.

       -xh  Extracts  the mail header lines from file.	The header line must be at the beginning of the file and separated from the remaining text
	    by a <CR> or <CRLF>.  Each header line is a string containing a header field name (for example, Subject), a colon  (:),  one  or  more
	    spaces,  and  a  field  value.  Each header line may have embedded continuation sequences it it (for example, LF followed by spaces or
	    tabs).

       -xT  Extracts all the text parts of the mail message in file to the standard output.

       -xD  Extracts any DOTS bodyparts in file. The DOTS document is sent to the standard output.  This is the reverse of the -c option above.

	    The file must be specified for the -c option.  If file is not specified with the -x or -t option then the standard input is used.

Examples
       The following are examples of how to use the command:

       Encapsulates a DDIF document
       capsar -c file.ddif | more

       Lists the header line from the mail message
       capsar -xh file.mail

       Extracts the encapsulated DOTS file from the file
       capsar -xD file > file.dots

	    or

       capsar -xD file | dtoc

       In order to mail a DDIF/DOTS document you can use one of the following:
       capsar -c file.ddif | mail -s "subject" address

       capsar -c file.ddif | mhmail -subject "subject" address

       Use the second command if you are using RAND mh.

       A DOTS file is extracted from dxmail first extracting the message into a file. The dxmail utility has an extract feature built in so  isn't
       needed.

See Also
       compress(1), ctod(1), dtoc(1), mail(1), mh(1mh), mhmail(1mh), uuencode(1), vdoc(1), prompter(1mh), DDIF(5), DOTS(5)

																	 capsar(1)
All times are GMT -4. The time now is 11:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy