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)
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)
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)
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)
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)
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)
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)
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)
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)
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
mojo::content::multipart
Mojo::Content::MultiPart(3pm) User Contributed Perl Documentation Mojo::Content::MultiPart(3pm)NAME
Mojo::Content::MultiPart - HTTP 1.1 multipart content container
SYNOPSIS
use Mojo::Content::MultiPart;
my $multi = Mojo::Content::MultiPart->new;
$multi->parse('Content-Type: multipart/mixed; boundary=---foobar');
my $single = $multi->parts->[4];
DESCRIPTION
Mojo::Content::MultiPart is a container for HTTP 1.1 multipart content as described in RFC 2616.
EVENTS
Mojo::Content::Multipart inherits all events from Mojo::Content and can emit the following new ones.
"part"
$multi->on(part => sub {
my ($multi, $single) = @_;
...
});
Emitted when a new Mojo::Content::Single part starts.
$multi->on(part => sub {
my ($multi, $single) = @_;
return unless $single->headers->content_disposition =~ /name="([^"]+)"/;
say "Field: $1";
});
ATTRIBUTES
Mojo::Content::MultiPart inherits all attributes from Mojo::Content and implements the following new ones.
"parts"
my $parts = $multi->parts;
$multi = $multi->parts([]);
Content parts embedded in this multipart content, usually Mojo::Content::Single objects.
METHODS
Mojo::Content::MultiPart inherits all methods from Mojo::Content and implements the following new ones.
"new"
my $multi = Mojo::Content::MultiPart->new;
Construct a new Mojo::Content::MultiPart object and subscribe to "read" event with default content parser.
"body_contains"
my $success = $multi->body_contains('foobarbaz');
Check if content parts contain a specific string.
"body_size"
my $size = $multi->body_size;
Content size in bytes.
"build_boundary"
my $boundary = $multi->build_boundary;
Generate a suitable boundary for content.
"clone"
my $clone = $multi->clone;
Clone content if possible, otherwise return "undef".
"get_body_chunk"
my $chunk = $multi->get_body_chunk(0);
Get a chunk of content starting from a specfic position.
"is_multipart"
my $true = $multi->is_multipart;
True.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojo::Content::MultiPart(3pm)