Sponsored Content
Top Forums Shell Programming and Scripting Send mail with font color change Post 303037147 by jgt on Wednesday 24th of July 2019 07:14:58 PM
Old 07-24-2019
You will have to build the body of the email using html tags to use color.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Font Color Change Using .profile

Does anyone know how can I change font color, background color etc for a particular user using .profile? Any help is appreciated. (0 Replies)
Discussion started by: fifo_vs_lifo23
0 Replies

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

3. UNIX for Dummies Questions & Answers

How to change the font or color of text

Hi Gurus, I have a small requirement where i want to change the color & font of some text in a file. i have a file error.txt which will be created in the script using egrep. After that iam adding these lines at head & tail to that file using the following code awk 'BEGIN{print"Please... (4 Replies)
Discussion started by: pssandeep
4 Replies

4. Shell Programming and Scripting

Specifying font type and color in a shell script

Hi, I am new to shell script. Can you please tell me, whether can we specify font type and color in a shell script? If so, how to do this? Thanks in advance. (4 Replies)
Discussion started by: Vani_Govind
4 Replies

5. Shell Programming and Scripting

Change color or font when executing a script

I'm writing a simple menu script and I would like to output the whole script using background color: black AND foreground color:white. Meaning if the ssh terminal of a user is set to green for example, it will change to my desired color when menu script is executed. Once the script is exited, it... (1 Reply)
Discussion started by: lhareigh890
1 Replies

6. Shell Programming and Scripting

font color in script

i am using ubuntu 11.04 and i just finished writing a shell script but i was wanting to know if their is a way to change the font color of just one sentence? (2 Replies)
Discussion started by: hotshot247
2 Replies

7. UNIX for Dummies Questions & Answers

How to change the background color in the init 3 mode(not line color)

Hello, I am using RHEL 6.1 on VMware I am searching for a way to change background color (not line by line color wich one can using tput command) basically changing the color of the whole screen to white instead of the default black and changing font color to black and alos would like to... (2 Replies)
Discussion started by: Dexobox
2 Replies

8. Shell Programming and Scripting

Identify Color and send email with same color

Hello mates, I have a requirement where in which I have to mail an output from multiple programs in the same colour as the output from shell script. I have seen a post to mail html in our forum,but my case is I have to first identify which colour the output is in an then mail it to in the ... (10 Replies)
Discussion started by: Kingcobra
10 Replies

9. UNIX for Beginners Questions & Answers

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 ------------------------------------------------------------ Job Name: ABC Start Time: 07/20/2019 07:32:39 End Time: 07/20/2019... (4 Replies)
Discussion started by: sdosanjh
4 Replies
Email::Simple(3pm)					User Contributed Perl Documentation					Email::Simple(3pm)

NAME
Email::Simple - simple parsing of RFC2822 message format and headers SYNOPSIS
use Email::Simple; my $email = Email::Simple->new($text); my $from_header = $email->header("From"); my @received = $email->header("Received"); $email->header_set("From", 'Simon Cozens <simon@cpan.org>'); my $old_body = $email->body; $email->body_set("Hello world Simon"); print $email->as_string; ...or, to create a message from scratch... my $email = Email::Simple->create( header => [ From => 'casey@geeknest.com', To => 'drain@example.com', Subject => 'Message in a bottle', ], body => '...', ); $email->header_set( 'X-Content-Container' => 'bottle/glass' ); print $email->as_string; DESCRIPTION
"Email::Simple" is the first deliverable of the "Perl Email Project." The Email:: namespace was begun as a reaction against the increasing complexity and bugginess of Perl's existing email modules. "Email::*" modules are meant to be simple to use and to maintain, pared to the bone, fast, minimal in their external dependencies, and correct. METHODS
new my $email = Email::Simple->new($message, \%arg); This method parses an email from a scalar containing an RFC2822 formatted message and returns an object. $message may be a reference to a message string, in which case the string will be altered in place. This can result in significant memory savings. If you want to create a message from scratch, you should use the "create" method. Valid arguments are: header_class - the class used to create new header objects The named module is not 'require'-ed by Email::Simple! create my $email = Email::Simple->create(header => [ @headers ], body => '...'); This method is a constructor that creates an Email::Simple object from a set of named parameters. The "header" parameter's value is a list reference containing a set of headers to be created. The "body" parameter's value is a scalar value holding the contents of the message body. Line endings in the body will normalized to CRLF. If no "Date" header is specified, one will be provided for you based on the "gmtime" of the local machine. This is because the "Date" field is a required header and is a pain in the neck to create manually for every message. The "From" field is also a required header, but it is not provided for you. header_obj my $header = $email->header_obj; This method returns the object representing the email's header. For the interface for this object, see Email::Simple::Header. header_obj_set $email->header_obj_set($new_header_obj); This method substitutes the given new header object for the email's existing header object. header my @values = $email->header($header_name); my $first = $email->header($header_name); In list context, this returns every value for the named header. In scalar context, it returns the first value for the named header. header_set $email->header_set($field, $line1, $line2, ...); Sets the header to contain the given data. If you pass multiple lines in, you get multiple headers, and order is retained. If no values are given to set, the header will be removed from to the message entirely. header_names my @header_names = $email->header_names; This method returns the list of header names currently in the email object. These names can be passed to the "header" method one-at-a-time to get header values. You are guaranteed to get a set of headers that are unique. You are not guaranteed to get the headers in any order at all. For backwards compatibility, this method can also be called as headers. header_pairs my @headers = $email->header_pairs; This method returns a list of pairs describing the contents of the header. Every other value, starting with and including zeroth, is a header name and the value following it is the header value. body Returns the body text of the mail. body_set Sets the body text of the mail. as_string Returns the mail as a string, reconstructing the headers. crlf This method returns the type of newline used in the email. It is an accessor only. default_header_class This returns the class used, by default, for header objects, and is provided for subclassing. The default default is Email::Simple::Header. CAVEATS
Email::Simple handles only RFC2822 formatted messages. This means you cannot expect it to cope well as the only parser between you and the outside world, say for example when writing a mail filter for invocation from a .forward file (for this we recommend you use Email::Filter anyway). For more information on this issue please consult RT issue 2478, <http://rt.cpan.org/NoAuth/Bug.html?id=2478>. PERL EMAIL PROJECT
This module is maintained by the Perl Email Project <http://emailproject.perl.org/> AUTHORS
Simon Cozens originally wrote Email::Simple in 2003. Casey West took over maintenance in 2004, and Ricardo SIGNES took over maintenance in 2006. COPYRIGHT AND LICENSE
Copyright 2004 by Casey West Copyright 2003 by Simon Cozens This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-12-23 Email::Simple(3pm)
All times are GMT -4. The time now is 11:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy