Issues in sending mail with attachements


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Issues in sending mail with attachements
# 1  
Old 09-21-2011
Issues in sending mail with attachements

Hi

I am using the below command to send mail from unix with body as well as attachment.

But the attachment is in encoded form in the body itself.

I am not receiving as attachment:
Code:
(cat body_success.txt;uuencode Log.txt Log.txt)| mailx -s "success" $ToID

I am receiving something liek below in the body itself:
Code:
 
finebegin 664 Log.txt
M<&%R86UE=&5R<R!A<F4@<V5T"DIO8G,@87)E(&EN(')U;FYA8FQE('-T871E
M"G1H92!J;V(@:7,@<G5N;FEN9R *=&AE(&IO8B!I<R!R=6YN:6YG( IT:&4@
M:F]B(&ES(')U;FYI;F<@"G1H92!F:7)S="!I;G-T86YC92!O9B!T:&4@0V]M
M8F]P87-S(&IO8B!F:6YI<VAE9"!F:6YE"C$*=&AE('-E8V]N9"!I;G-T86YC
M92!O9B!T:&4@0V]M8F]P87-S(&IO8B!F:6YI<VAE9"!F:6YE"C$*8F]T:"!T
M:&4@:6YS=&%N8V5S(&9I;FES:&5D(&9I;F4*<W5C8V5S<R!M86EL('=A<R!S
$96YT"FYS

end

Please help me in this.

I am using SunOS4

Thanks
# 2  
Old 09-21-2011
Save the mail in a file like mycoded.mail..., and use uudecode:
Code:
uudecode mycoded.mail

# 3  
Old 09-21-2011
Hi

I am sending mail from unix to windows

In windows I can't use uudecode..
# 4  
Old 09-21-2011
# 5  
Old 09-21-2011
Do you have mailx on your system? ( SunOS 4 is too old for me to remember...)
If so or try to adapt:
Code:
 \cat File | \ux2dos | \mailx -s "ljkdfj" foo.me@foo.foo.com

# 6  
Old 09-21-2011
Addendum:
I have a .mailrc in my home directory, content:
Code:
#.mailrc - To sent  to exchange server....
# for use with mailx from HP-UX...
set crt=21
set encoding=8bit
set charset=iso-8859-1
# set mimeheader=yes

 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issues sending emails using PostFix Mail Server

I'm unable to send email from my Linux server despite SMTP port 25 Active and Listening. # hostname TechX I checked the mail log ( /var/log/maillog ) and found the below error. I'm sharing all the ".cf" files seen in the error log. 1. # more /etc/postfix/main.cf # postfix... (0 Replies)
Discussion started by: mohtashims
0 Replies

2. AIX

Mail command to send attachements

I tried the below command uuencode data.txt | mailx -s “Test Mail” “mrp@xyz.com” But I get the below error ksh: uuencode: not found. Null Message body; hope that' ok which clearly tell that uuencode utility is not found. Is there any other way to send attachments with mail through... (7 Replies)
Discussion started by: rpm120
7 Replies

3. Red Hat

Problems sending mail: Difference between Mail and Mailx?

Whats the difference between mail and mailx? I'm trying to troubleshoot a problem where I can send mail from server A with this `echo $MESSAGE | mail -s "$SUBJECT" -r $FROM $RECIPIENTS` command but executing the same command from server B throws me this error (Both servers are RHEL) ... (1 Reply)
Discussion started by: RedSpyder
1 Replies

4. UNIX for Dummies Questions & Answers

issues in sending mail

Hi, i am trying the below script for sending mail. if then count=`cat $sfile|wc -l` echo "There are $count abends.Please take care " > body.txt (cat body.txt;uuencode $sfile $sfile) | mailx -s "Alert:there are failures" pandeesh@gmail.com fi In the mail, i am getting like: ... (4 Replies)
Discussion started by: pandeesh
4 Replies

5. UNIX for Advanced & Expert Users

Issues while sending a mail having records fetched from SQL -all in UNIX

hi-I want to write a UNIX Script which will fetch records from Oracle database.I want to store these records in a file under fields like email address,name and the transaction_id and then fetch these records from the file and send the email to individual users with their transaction ID details. (4 Replies)
Discussion started by: DeepSalwan
4 Replies

6. UNIX for Advanced & Expert Users

Problem while sending mail with attachements

Hi All, I am using mailx command in shell script to send mail with output files as attachment to my email id. When my colleague is running the shell script (script code mentioned below), he is getting the mail but without attachment. Attachment is appeared as junk characters in mail... (4 Replies)
Discussion started by: nishant_pathak_
4 Replies

7. Shell Programming and Scripting

Send Attachements in Mail (CSHELL)

Hi All, Is there any way we can send attachement in a mail from the script using CSHELL. Thanks in Advance. (1 Reply)
Discussion started by: surfsg24
1 Replies

8. Linux

attachements with mail command

Is there any way to send attachments via "mail" command from the terminal? im writing a simple bash script to send my backups to my email address (2 Replies)
Discussion started by: C|[anti-trust]
2 Replies
Login or Register to Ask a Question