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
TIDY_GET_HTML(3)							 1							  TIDY_GET_HTML(3)

tidy::html - Returns atidyNodeobject starting from the <html> tag of the tidy parse tree

       Object oriented style

SYNOPSIS
tidyNode tidy::html (void ) DESCRIPTION
Procedural style tidyNode tidy_get_html (tidy $object) Returns a tidyNode object starting from the <html> tag of the tidy parse tree. PARAMETERS
o $object - The Tidy object. RETURN VALUES
Returns the tidyNode object. EXAMPLES
Example #1 tidy_get_html(3) example <?php $html = ' <html> <head> <title>test</title> </head> <body> <p>paragraph</p> </body> </html>'; $tidy = tidy_parse_string($html); $html = $tidy->html(); echo $html->value; ?> The above example will output: <html> <head> <title>test</title> </head> <body> <p>paragraph</p> </body> </html> NOTES
Note This function is only available with Zend Engine 2 (PHP >= 5.0.0). SEE ALSO
tidy.body(3), tidy.head(3). PHP Documentation Group TIDY_GET_HTML(3)
All times are GMT -4. The time now is 06:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy