![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sending email attachments | venush | UNIX for Dummies Questions & Answers | 2 | 06-05-2008 10:42 PM |
| Sending multiple attachments | deo2k8 | Shell Programming and Scripting | 1 | 01-07-2008 10:12 PM |
| sending attachments via unix | Abhishek Ghose | UNIX for Advanced & Expert Users | 6 | 09-30-2005 01:49 PM |
| ksh : using mailx and attachments | madmat | Shell Programming and Scripting | 2 | 08-01-2005 08:06 PM |
| sending files as attachments | SmartJuniorUnix | How do I send email? | 9 | 04-13-2001 04:34 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dear All,
I'm using HP-UX and we have mailx as the mail client. I want to send a mail from the OS once I get the count from a table on Oracle. I'm thinking of redirecting the count to a file in Unix and get the output. This output spoolfile has to be sent through mail for reference. Please let me know how can I attach this spoolfile("Status`date '+%d%m%y%H%M'`.txt") to the mail. Here is the code sample I'm using: #!/bin/ksh #. ./set_mail_details.ksh ORACLE_HOME="/software/ora/oracle/product/8.1.7/" export ORACLE_HOME lp=0 count=`/software/ora/oracle/product/8.1.7/bin/sqlplus -s scott/tiger@ora <<EOP set term off set heading off feedback off verify off SELECT count(1) FROM <Table> ; exit; / EOP` echo "$count" >> "Status`date '+%d%m%y%H%M'`.txt" echo 'In script' subject="Status Mail" echo '\nsubject' echo "$subject" | sed 's/~/ /g' | read sub body_of_email=`cat ./Mail.txt` echo '\nBody\n\n' echo '\nMail List' to_list=<recipient@domain.com> echo "$to_list" echo "$body_of_email" | sed 's/~/ /g' | read body (echo "$body";echo "The Count is:\t";echo "$count";echo "\n"; cat MailFooter.txt )| mailx -s "$sub" -r <sender@domain.com> "$to_list" if [ $? -eq 0 ] then echo "Mail is Sent" else echo "Mail is not sent(In script)" fi |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Sending a file as attachment through mailx command
Code:
uuencode file_name file_name | mailx -s "Subject of mail" "receive@domain.com" |
|
#3
|
|||
|
|||
|
hi,
I have even used similar version of the command, but that is also not working.... Please help me. Regards RK Veluvali |
|
#4
|
|||
|
|||
|
I have worked with uuencode in HP-UX. Give a try by executing the uuencode by issuing the full path.
If not then try to check out from similar threads like Mail with attachment |
|
#5
|
|||
|
|||
|
Problem attaching more than 1 file in single email, using uuencode and mailx command
Hi,
I'm just debugging some UNIX code which is to be used to send multiple attachments in a single mail.I'm using: (uuencode $FILE $FILENAME; uuencode $FILE1 $FILENAME1) | mailx -s "$SUBJECT" somebody@some.com The problem is that, I'm receiving the e-mail with the first file attachment all OK, but the 2nd file as something like : begin 644 myfile.zip M4$L#!`H``````*I.)1\]0KO)J5(6`*E2%@`,````1%)5241$,# 0N6DE04$L# M!`H``````)9C#Q_E,1QY)3D6`"4Y%@`,````1%)5241$14TN03` S8.HL`!X& M`0`4``*1D6,5'Y%C%1\``````````````````$1254E$1$5-+D$P,P` `<`V[ So, probably, it's printing the encoded file in the mail body for the second attachment. Can you please help me out with this problem. A lot of thanks. Subh |
|||
| Google The UNIX and Linux Forums |
| Tags |
| mailx, mailx attachment |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|