02-06-2010
What you are doing is adding termcap/terminfo entries into your email message. As long as the reader of the email uses a terminal session with the same attributes, the reader will see the message in color.
If the reader is going to use a "standard" MS windows email client, then you should add HTML tags to your email.
To see what this looks like, try creating the a message the way you want to see it in Outlook Express/Thunderbird/etc and send it to a recipient on your unix system, then retrieve the email from /var/spool/mail/recipient.
Then create your script to create a similar email.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Sorry for this one ladies and gents, it's probably very easy but I don't know how to, sound familiar :-)
I'm using sendmail on a web server that sends some mail through forms, not many.
I've got sendmail configured to use our networks relay host and everything was working well.
The power... (4 Replies)
Discussion started by: mjdavies
4 Replies
2. UNIX for Advanced & Expert Users
Hi
I want to change the color of the email content sent through unix. I tried a lot and left in vain. I heard that it could be done by sending the email as HTML. But I don't how to do it. Can you all share your ideas?
~sakthifire (1 Reply)
Discussion started by: sakthifire
1 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I email some info daily to my employees using a script. But they tend to overlook an important part so I wanted to bold that particular section. Everyone here uses outlook to receive their emails. I would like to know how to send an email to my employees with some parts in bold. (3 Replies)
Discussion started by: Amonkira
3 Replies
4. Shell Programming and Scripting
Dear all-
I have a requirement to send an email via email with body content which looks something below-
Email body contents
--------------------
RequestType: Update
DateAcctOpened: 1/5/2010
Note that header information and data content should be normal text..
Please advice on... (5 Replies)
Discussion started by: sureshg_sampat
5 Replies
5. Shell Programming and Scripting
Hi All,
This is my first port.....
I am using AIX 5L, installed 10g database.
On daily basis we takes rman backup.
This backup status info strored in a log file.
I write a script to know the status of back means I will fire this script and this script will send a mail to me.
#!/bin/bash... (16 Replies)
Discussion started by: mcagaurav
16 Replies
6. Shell Programming and Scripting
This is my first time writing a script and Im having some trouble,
Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage
I tried grep
Obviosly that hasnt worked,
Any... (8 Replies)
Discussion started by: jay02
8 Replies
7. UNIX for Advanced & Expert Users
Hi All,
The below is the email text and i want few words in BOLD.
I am writing the below message in to a .txt file and calling it in a function which generated email. when i run at cmd prompt it is working fine , but wehn i run a script .sh it is not working. Below is the text printing in to... (2 Replies)
Discussion started by: kiranparsha
2 Replies
8. Shell Programming and Scripting
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
9. Red Hat
Hello experts!!
I am trying to send an email with message body and attachment.but i am getting any one like message body or attachment.
I tried below command:
(echo "subject:test";echo "MIME-Version: 1.0";echo "content-transfer-encoding:base 64";echo "content-type:txt;name=test.txt";cat... (2 Replies)
Discussion started by: Devipriya Ch
2 Replies
LEARN ABOUT DEBIAN
log::dispatch::email
Log::Dispatch::Email(3pm) User Contributed Perl Documentation Log::Dispatch::Email(3pm)
NAME
Log::Dispatch::Email - Base class for objects that send log messages via email
VERSION
version 2.32
SYNOPSIS
package Log::Dispatch::Email::MySender;
use Log::Dispatch::Email;
use base qw( Log::Dispatch::Email );
sub send_email {
my $self = shift;
my %p = @_;
# Send email somehow. Message is in $p{message}
}
DESCRIPTION
This module should be used as a base class to implement Log::Dispatch::* objects that send their log messages via email. Implementing a
subclass simply requires the code shown in the SYNOPSIS with a real implementation of the "send_email()" method.
CONSTRUCTOR
The constructor takes the following parameters in addition to the standard parameters documented in Log::Dispatch::Output:
o subject ($)
The subject of the email messages which are sent. Defaults to "$0: log email"
o to ($ or @)
Either a string or a list reference of strings containing email addresses. Required.
o from ($)
A string containing an email address. This is optional and may not work with all mail sending methods.
o buffered (0 or 1)
This determines whether the object sends one email per message it is given or whether it stores them up and sends them all at once.
The default is to buffer messages.
METHODS
o send_email(%p)
This is the method that must be subclassed. For now the only parameter in the hash is 'message'.
o flush
If the object is buffered, then this method will call the "send_email()" method to send the contents of the buffer and then clear the
buffer.
o DESTROY
On destruction, the object will call "flush()" to send any pending email.
AUTHOR
Dave Rolsky <autarch@urth.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2011 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
perl v5.14.2 2012-05-25 Log::Dispatch::Email(3pm)