12-09-2010
There's no easy way to fulfill your requirements from the command line. Sending HTML emails: easy. Sending HTML emails with images and an attached PDF: not so easy. The problem is that you'll either have to provide a full URL for the images, or attach them too.
Instead of sending from the command line, I'd suggest taking a look at
MIME::Lite. It even includes an
example of how to send an HTML mail with images.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I am working on UNIX (Solaris28). I would like to send an email in which the body will be in html format and, in the same mail, a xls file has to be attached.
I have tried this: the file is correctly attached but the body comes as html source and not formatted. If I do not attach the... (4 Replies)
Discussion started by: stefan.yu
4 Replies
2. UNIX for Dummies Questions & Answers
I'm trying to script sending an e-mail message on an AIX 5.x server with the following requirements:
1. command line switch to specify file name containing message body in HTML format
2. command line switch to specify file name of a binary attachment
3. command line or input file to specify... (4 Replies)
Discussion started by: G-Man
4 Replies
3. Shell Programming and Scripting
i know its pretty repeated query, but i need to post it in this new thread coz i need it urgently
uuencode /var/tmp/chandra/emaillist.txt emaillist.txt | mail -s "message with encoded attachment"
am unable to send the attachment emaillist.txt present in the path /var/tmp/chandra/
Is... (11 Replies)
Discussion started by: cmaroju
11 Replies
4. Red Hat
Hi there..
I need a proper "mutt" command to send a mail with html body and html attachment at a time.
Also if possible let me know the other commands to do this task.
Please help me.. (2 Replies)
Discussion started by: vickramshetty
2 Replies
5. 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
6. Shell Programming and Scripting
Team,
I have the below code, which is working fine and it sends the html report using sendmail command.
I want to attach one more file ( which goes as attachment ) in that email. How to achieve it.
i tried with uuencode. But no luck :mad:
outputFile="/tmp/out.html"
(
echo... (2 Replies)
Discussion started by: itkamaraj
2 Replies
7. 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
8. Shell Programming and Scripting
Hi All,
The below code is working fine for me.
mailx -s hello abc@xyz.com <<EOT
Hello !!!
How are you?
Regards
Rahul
EOT
But i am not able to send csv file with the mail .Getting just themail but not the attachment.
uuencode /path/s1.csv | mailx -s hello abc@xyz.com <<EOT... (9 Replies)
Discussion started by: rafa_fed2
9 Replies
9. Shell Programming and Scripting
I am attempting to write a script where I can pass in parameters ( to , from, the location of a pdf attachment ) and send an email that has HTML for the body content and a PDF as an attachment.
I have failed to achieve this with sendmail and mutt. I recently found this.
If there are any... (2 Replies)
Discussion started by: jvsrvcs
2 Replies
10. HP-UX
Heyy,
any help would be grateful....
LOOKING FOR THE WAYS TO SEND AN EMAIL WITH ATTACHMENT & HTML TABLES IN BODY THROUGH SHELL SCRIPT (LINUX)..NOT SURE, IF WE HAVE ANY INBUILT HTML TAG OR UNIX COMMAND TO SEND THE ATTACHMENTS. KINDLY HELP
below is small script posted for our understanding..... (2 Replies)
Discussion started by: Harsha Vardhan
2 Replies
LEARN ABOUT DEBIAN
exporter::lite
Exporter::Lite(3pm) User Contributed Perl Documentation Exporter::Lite(3pm)
NAME
Exporter::Lite - Lightweight exporting of variables
SYNOPSIS
package Foo;
use Exporter::Lite;
# Just like Exporter.
@EXPORT = qw($This That);
@EXPORT_OK = qw(@Left %Right);
# Meanwhile, in another piece of code!
package Bar;
use Foo; # exports $This and &That.
DESCRIPTION
This is an alternative to Exporter intended to provide a lightweight subset of its functionality. It supports "import()", @EXPORT and
@EXPORT_OK and not a whole lot else.
Unlike Exporter, it is not necessary to inherit from Exporter::Lite (ie. no "@ISA = qw(Exporter::Lite)" mantra). Exporter::Lite simply
exports its import() function. This might be called a "mix-in".
Setting up a module to export its variables and functions is simple:
package My::Module;
use Exporter::Lite;
@EXPORT = qw($Foo bar);
now when you "use My::Module", $Foo and "bar()" will show up.
In order to make exporting optional, use @EXPORT_OK.
package My::Module;
use Exporter::Lite;
@EXPORT_OK = qw($Foo bar);
when My::Module is used, $Foo and "bar()" will not show up. You have to ask for them. "use My::Module qw($Foo bar)".
Methods
Export::Lite has one public method, import(), which is called automaticly when your modules is use()'d.
In normal usage you don't have to worry about this at all.
import
Some::Module->import;
Some::Module->import(@symbols);
Works just like "Exporter::import()" excepting it only honors @Some::Module::EXPORT and @Some::Module::EXPORT_OK.
The given @symbols are exported to the current package provided they are in @Some::Module::EXPORT or @Some::Module::EXPORT_OK.
Otherwise an exception is thrown (ie. the program dies).
If @symbols is not given, everything in @Some::Module::EXPORT is exported.
DIAGNOSTICS
'"%s" is not exported by the %s module'
Attempted to import a symbol which is not in @EXPORT or @EXPORT_OK.
'Can't export symbol: %s'
Attempted to import a symbol of an unknown type (ie. the leading $@% salad wasn't recognized).
BUGS and CAVEATS
Its not yet clear if this is actually any lighter or faster than Exporter. I know its at least on par.
OTOH, the docs are much clearer and not having to say "@ISA = qw(Exporter)" is kinda nice.
AUTHORS
Michael G Schwern <schwern@pobox.com>
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
SEE ALSO
Exporter, Exporter::Simple, UNIVERSAL::exports
perl v5.10.0 2006-11-11 Exporter::Lite(3pm)