Sponsored Content
Top Forums UNIX for Advanced & Expert Users send attachments using send mail in Solaris Post 302310493 by mohan_kumarcs on Saturday 25th of April 2009 04:17:59 AM
Old 04-25-2009
Java send attachments using send mail in Solaris

Hi All,

I have a requirement to send and email of body html with an attachment.

concatinating uuencode output to the mail body with mailx command works, but as my Email body is of HTML type i use sendmail.

my command to send HTML body is as below:

export MAILTO="recipient@domain.com"
export CONTENT="./html/body.html"
export SUBJECT="TEST EMAIL: TESTING HTML"
(
echo "From: noreply@domain.com"
echo "To: $MAILTO"
echo "Subject: $SUBJECT"
echo "MIME-Version: 1.0"
echo "Content-Type: text/html"
echo "Charset: iso-8859-1"
echo "Content-Disposition: inline"
cat $CONTENT
) | /usr/sbin/sendmail -t


With the above command I can send html body contents through send mail.
But, to the above scenario I need even the attachment.

Please help me out for this.

Thanks,
Mohan Kumar CS
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Send mail with attachments automatically in a interval period

hai everyone I want to send mail with attachments automatically for every 15 minutes getting different E-mail IDs from a file if any script is available , Please send to me .. This will be very useful for my project.... Thanks for your time..... Felix ... (3 Replies)
Discussion started by: Leo Felix
3 Replies

2. Solaris

mail problems - how to send mail on solaris

Hello I am new user on solaris... I need to configure my solaris to be able to send mails... I know mailx command mailx -s hello address@address.com but I get an error... you have mail in /var/mail/root # hello... User unknown /dead.letter... Saved message in /dead.letter what... (10 Replies)
Discussion started by: amon
10 Replies

3. UNIX for Dummies Questions & Answers

Can not send mail in solaris 5.9

Hi !! I'm trying to send myself a mail from my Solaris server, i had tryed with this commands: mail -s "test" irasela@yahoo.com < /monitoring/space/bitacora.txt mailx -s "test" irasela@yahoo.com < /monitoring/space/bitacora.txt sendmail -F "test" address "irasela.yahoo.com" -t... (1 Reply)
Discussion started by: irasela
1 Replies

4. AIX

Send mail attachments and have a mail body

Hi, How can I send mail attachments from shell script (AIX) and have a mail body as well ? Thanks in advance. (1 Reply)
Discussion started by: shibajighosh
1 Replies

5. Shell Programming and Scripting

Unable to send mail, on sun solaris

hi experts, I m new to the sun solaris. on our OS (sun solaris 5.8) i m trying to send mail but i not getting any mail, i have tried doing following . $mailx -s "Test" sivakumars@kesd.com But no response there no error also... pls let me know: 1) How can test sending mail through... (3 Replies)
Discussion started by: saisivakumar
3 Replies

6. Red Hat

How to send mail with multiple attachments?

We don't have uuencode installed in our machines..... Please tell me how to send mail with multiple attachments ??? URGENT !!!!! Please tell me using command line (or) scripts.......... please...... Thanks in Advance.... (1 Reply)
Discussion started by: vamshigvk475
1 Replies

7. UNIX for Advanced & Expert Users

How to send mail with attachments in hpux server?

I am trying to send a mail alongwith attachments in hpux server. Its not throwing any error but it seems the command is still running,neither its sending the mail. The commands i am using is- uuencode 00PZ00000012OHJMA2.csv | mailx -s "Hello" abc@hp.com uuencode Shell_Script_Sample.ksh |... (1 Reply)
Discussion started by: saga20
1 Replies

8. Shell Programming and Scripting

Need to send file through mail from Solaris

I have Solaris-10 and some job is writing a log. My client needs this log file every two hour in his mail. Usually I send manual mail through mailx command, as sendmail is configured with relay server, but I am not sure, how to attach file in a mail and set it in cronjob. Please give me some... (3 Replies)
Discussion started by: solaris_1977
3 Replies

9. Shell Programming and Scripting

Mail command --> send multiple attachments

Hi, i try to send two (multiple) files by the mail-console-command mail -s TEST -a f1.pdf f2.pdf n.ame@ms123.de but it doesn't work. can someone give me a hint? Thanks in advance, IMPe (2 Replies)
Discussion started by: IMPe
2 Replies
HTML::Display::Common(3pm)				User Contributed Perl Documentation				HTML::Display::Common(3pm)

NAME
HTML::Display::Common - routines common to all HTML::Display subclasses __PACKAGE__->new %ARGS Creates a new object as a blessed hash. The passed arguments are stored within the hash. If you need to do other things in your constructor, remember to call this constructor as well : package HTML::Display::WhizBang; use parent 'HTML::Display::Common'; sub new { my ($class) = shift; my %args = @_; my $self = $class->SUPER::new(%args); # do stuff $self; }; $display->display %ARGS This is the routine used to display the HTML to the user. It takes the following parameters : html => SCALAR containing the HTML file => SCALAR containing the filename of the file to be displayed base => optional base url for the HTML, so that relative links still work location (synonymous to base) Basic usage : my $html = "<html><body><h1>Hello world!</h1></body></html>"; my $browser = HTML::Display->new(); $browser->display( html => $html ); Location parameter : If you fetch a page from a remote site but still want to display it to the user, the "location" parameter comes in very handy : my $html = '<html><body><img src="/images/hp0.gif"></body></html>'; my $browser = HTML::Display->new(); # This will display part of the Google logo $browser->display( html => $html, base => 'http://www.google.com' ); AUTHOR
Copyright (c) 2004-2007 Max Maischein "<corion@cpan.org>" LICENSE
This module is released under the same terms as Perl itself. perl v5.10.1 2007-10-20 HTML::Display::Common(3pm)
All times are GMT -4. The time now is 10:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy