Sponsored Content
Full Discussion: Send mail with font change
Top Forums UNIX for Beginners Questions & Answers Send mail with font change Post 303037137 by sdosanjh on Wednesday 24th of July 2019 02:00:22 PM
Old 07-24-2019
Send mail with font 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
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

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

I am using following simple method to send mail, but not familiar how to change the font of particular text where error is seen.
Pls help

Code:
{
echo "From: "
echo "To:  abc@xyz.com
echo "Subject: Status Report - for jobs -- $DATE"

cat /tmp/report.$DATE
} | /usr/sbin/sendmail -t

 

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
MboxParser::Mail::Convertable(3pm)			User Contributed Perl Documentation			MboxParser::Mail::Convertable(3pm)

NAME
Mail::MboxParser::Mail::Convertable - convert mail for sending etc. SYNOPSIS
use Mail::MboxParser; [...] # $msg is a Mail::MboxParser::Mail-object my $mail = $msg->make_convertable; $mail->delete_from_header('date', 'message-id'); $mail->replace_in_header('to', 'john.doe@foobar.com'); $mail->add_to_header( ['cc', 'john.does.brother@foobar.com'], where => 'BEHIND' ); $mail->send('sendmail'); DESCRIPTION
This class adds means to convert an email object into something that could be send via SMTP, NNTP or dumped to a file or filehandle. Therefore, methods are provided that change the structure of an email which includes adding and removing of header-fields, MIME-parts etc and transforming them into objects of related modules. Currently, only basic manipulation of the header and sending using Mail::Mailer is provided. More is to come soon. This class works non-destructive. You first create a Convertable-object and do any modifications on this while the Mail-object from which it was derived will not be touched. METHODS
delete_from_header(header-fields) Given a list of header-field names, these fields will be removed from the header. If you want to re-send a message, you could for instance remove the cc-field cause otherwise the message would be carbon-copied to the addresses listed in the cc-field. add_to_header(array-ref) add_to_header(array-ref, where => 'BEFORE' | 'BEHIND') add_to_header() takes a reference to a two-element list whose first element specifies the header-field to add or to add to while the second elements specifies the data that should be added. 'where' specifies whether to add at the beginning or at the end of the header. Defaults to 'BEHIND' if not given. replace_in_header(header-field, new_data) First element must be the header-field to be replaced while the second argument must be a string indicating what will be the new content of the header-field. send(command, args) Literally inherited from Mail::Internet. Commands can be "mail" (using the UNIX-mail program), "sendmail" (using a configured sendmail or compatible MTA like exim), "smtp" (for using Net::SMTP) and "test" which will only display what would be sent using /bin/echo. Additional arguments will be passed on to Mail::Mailer->new() which is in fact what Mail::Internet->send() uses. For more details, see Mail::Mailer VERSION
This is version 0.55. AUTHOR AND COPYRIGHT
Tassilo von Parseval <tassilo.von.parseval@rwth-aachen.de> Copyright (c) 2001-2005 Tassilo von Parseval. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Mail::Internet, Mail::Mailer perl v5.12.3 2005-12-08 MboxParser::Mail::Convertable(3pm)
All times are GMT -4. The time now is 09:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy