07-13-2011
additional info
Jayan,
Thanks for a very useful post...additional question: How can I work some body test into the reference file? Have tried a number of combinations that either break the attachment and put it inline as the body or attach the file I need, but ignore any attempts to add message body text. Is this done in Line 10 where <your inline text content> is?
Regards,
gdsmith
Last edited by gdsmith; 07-13-2011 at 11:32 AM..
Reason: additional info
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I am new to unix and scripting.I am trying to send a html file as an attachment.
SUBJECT="Type of Exceptions in Application"
TO=Sushovan.Samals@gmail.com
SPOOLFILE=/data/reg/tlogs/Monitor.html
#echo "Send the E-mail message..."
uuencode $SPOOLFILE $SPOOLFILE | mailx -s "$SUBJECT" $TO... (2 Replies)
Discussion started by: sushovan
2 Replies
2. Shell Programming and Scripting
Hi folks,
I have a perl script which sends out email after successful completion of job as inline html, I want to send it out as two parts now as html inline and html attachment. see the attached script.
Thanks in advance (1 Reply)
Discussion started by: sol_nov
1 Replies
3. Shell Programming and Scripting
The below code is not working. I am able to send only inline html or only attachment. When trying to do both, only inline html is sent without attachment. Please help!
#!/bin/ksh
(echo "Subject: Test Mail - HTML Format"
echo "MIME-Version: 1.0"
echo "Content-Type: text/html"
echo... (1 Reply)
Discussion started by: thulasidharan2k
1 Replies
4. Shell Programming and Scripting
I have an HTML file I am currently sending in the body of an email. I now have a need to send a csv attachment along with it. I can ONLY use sendmail as mutt and xmail etc are not on the server.
Here is what I am currently using: It is possible to add code to add an attachment ??!?
{
... (8 Replies)
Discussion started by: atelford
8 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I have a script which is sending an html file as an attachment.
#!/usr/bin/ksh
export MAILTO="user@company.com"
export CONTENT="/usr/tmp/file.html"
export SUBJECT="EmailSubject"
(
echo "Subject: $SUBJECT"
echo "MIME-Version: 1.0"
echo "Content-Type: text/html"
echo... (0 Replies)
Discussion started by: sreenathkg
0 Replies
6. Shell Programming and Scripting
Hello,
I need to send below text (in a file ABC)as html text in mail body and the same as csv attachment
1,2,3
4,5,6
7,8,9
but to send as html text in mailbody we use
echo "Subject: Report " | cat - ABC | /usr/lib/sendmail -t a@xyz.com
and to send as an attachment in csv format we... (9 Replies)
Discussion started by: skhichi
9 Replies
7. Shell Programming and Scripting
Hi,
i have the following code in shell named as test3.sh..
#!/bin/sh
. /home/<user>/.profile
export dt=`date "+%d%b%y"`
export tim=`date "+%d%b%y %HM:%MM"`
cd
export WD=`pwd`
SID="<sid>"
export SID
export ORACLE_SID=$SID
export ORACLE_HOME=/oracle/$SID/102_64
export... (4 Replies)
Discussion started by: jassi10781
4 Replies
8. Shell Programming and Scripting
Send_Mail()
{
C_Date=`date +"%m/%d/%Y"`
#Subject="MMDB Load Job Status"
for i in `cat $Metafile`
do
if
then
email_address=`echo $i | cut -d":" -f2`
/usr/lib/sendmail "$email_address" < $Email_File
fi
done
}
this is the send mail command i am using .please let me... (1 Reply)
Discussion started by: Alok K Yadav
1 Replies
9. Shell Programming and Scripting
Hi Everyone,
I am facing problems in sending html mail with attachemnt.
I will able to send mail with attachment (plain text ) using mailx -s and uuencode command and
also html mail without attachment using sendmail option.
However I am not able to send html mail along with attachment.Either... (2 Replies)
Discussion started by: karthik adiga
2 Replies
10. Shell Programming and Scripting
Hi,
I am having trouble in sending a mail with html body and attachment (csv file). We don't have uuencode or mutt (not allowed to install as well)
The below code is perfectly working for sending the html body alone:
export MAILTO=abc@xyz.com
export CONTENT="/home/abc/list.html"... (2 Replies)
Discussion started by: close2jay
2 Replies
LEARN ABOUT DEBIAN
courriel::header::contenttype
Courriel::Header::ContentType(3pm) User Contributed Perl Documentation Courriel::Header::ContentType(3pm)
NAME
Courriel::Header::ContentType - The content type for an email part
VERSION
version 0.29
SYNOPSIS
my $ct = $part->content_type();
print $ct->mime_type();
print $ct->charset();
my %attr = $ct->attributes();
while ( my ( $k, $v ) = each %attr ) {
print "$k => $v
";
}
DESCRIPTION
This class represents the contents of a "Content-Type" header attached to an email part. Such headers always include a mime type, and may
also include additional information such as a charset or other attributes.
Here are some typical headers:
Content-Type: text/plain; charset=utf-8
Content-Type: multipart/alternative; boundary=abcdefghijk
Content-Type: image/jpeg; name="Filename.jpg"
API
This class supports the following methods:
Courriel::Header::ContentType->new_from_value( ... )
This takes two parameters, "name" and "value". The "name" is optional, and defaults to "Content-Type".
The "value" is parsed and split up into the mime type and attributes.
Courriel::Header::ContentType->new( ... )
This method creates a new object. It accepts the following parameters:
o name
This defaults to 'Content-Type'.
o value
This is the full header value.
o mime_type
A string like "text/plain" or "multipart/alternative". This is required.
o attributes
A hash reference of attributes from the header, such as a boundary, charset, etc. The keys are attribute names and the values can
either be strings or Courriel::HeaderAttribute objects. Values which are strings will be inflated into objects by the constructor.
This is optional, and can be an empty hash reference or omitted entirely.
$ct->name()
The header name, usually "Content-Type".
$ct->value()
The raw header value.
$ct->mime_type()
Returns the mime type value passed to the constructor. However, this value will be in all lower-case, regardless of the original casing
passed to the constructor.
$ct->charset()
Returns the charset for the content type, which will be the value found in the "attributes", if one exists.
$ct->attributes()
Returns a hash (not a reference) of the attributes passed to the constructor.
Attributes are Courriel::HeaderAttribute objects.
The keys of the hash are all lower case, though the original casing is preserved in the "name()" returned by the Courriel::HeaderAttribute
object.
$ct->is_binary()
Returns true unless the attachment looks like text data. Currently, this means that is has a charset defined and the charset is not
"binary".
$ct->attribute($key)
Given a key, returns the named Courriel::HeaderAttribute object. Obviously, this value can be "undef" if the attribute doesn't exist. Name
lookup is case-insensitive.
$ct->attribute_value($key)
Given a key, returns the named attribute's value as a string. Obviously, this value can be "undef" if the attribute doesn't exist. Name
lookup is case-insensitive.
The attribute is a Courriel::HeaderAttribute object.
$ct->as_header_value()
Returns the object as a string suitable for a header value (but not folded). Note that this uses the original casing of the mime type as
passed to the constructor.
EXTENDS
This class extends Courriel::Header.
ROLES
This class does the Courriel::Role::HeaderWithAttributes role.
AUTHOR
Dave Rolsky <autarch@urth.org>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2012 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
perl v5.14.2 2012-03-07 Courriel::Header::ContentType(3pm)