Sent an email attachment, but the attachment is empty


 
Thread Tools Search this Thread
Operating Systems Solaris Sent an email attachment, but the attachment is empty
# 8  
Old 08-15-2012
Mail clients are bad at handling uuencoded attachments these days. Some don't understand them at all, some mangle them. Best to use base64 attachments if you can, but I don't know of any way that was as straightforward as uuencode was.
# 9  
Old 08-15-2012
mail is a bit picky about char sets and what it considers binary data. Pls post text_file.txt and the result of both unix2dos and uuencode. For a pure text file, you usually don't need uuencode. Btw, the file is not an attachment but will be the mail text itself.
You can also try to display the source code of the message (<ctrl> u in thunderbird) to help debug the problem.
# 10  
Old 08-15-2012
I sftp to the unix box and I got the text and zip files and I'm able to see them both on my PC. Why I can't see it when I email it. BTW I'm not an expert in unix.
# 11  
Old 08-15-2012
Probably because something's wrong with the email one way or another.

Have you tried viewing the source of the email as suggested? We can't really see your computers from here.
# 12  
Old 08-15-2012
This is the source code:
Code:
Received: from FLDP1LUMXC7HB02.domain.com (168.68.75.85) by
MXC7HB05.domain.com (168.68.59.192) with Microsoft SMTP Server
 (TLS) id 8.3.264.0; Wed, 15 Aug 2012 13:31:38 -0400
Content-Type: multipart/mixed;
 boundary="_8ba3ac-2ef3-4d69-84eb-0f92a29d51a5_"
Received: from omzsmtpi03.domain.com (165.122.46.173) by
 MXC7HB02.domain.com (168.68.75.85) with Microsoft SMTP Server
 id 8.3.264.0; Wed, 15 Aug 2012 13:31:36 -0400
To: name@domain.com
X-VzAPP: 1
X-IronPort-AV: E=Sophos;i="4.77,774,1336348800"; 
   d="scan'208";a="85187077"
X-Local: true
Received: from ndcc01-smtp1.domain.com ([148.170.124.35])  by
 omzsmtpi03.domain.com with ESMTP; 15 Aug 2012 17:31:35 +0000
Received: from pdcd35-snmcpe1.ip.mic.com (pdcd35-snmcpe1.ip.mic.com
 [208.112.196.84]) by ndcc01-smtp1.domain.com
 (8.13.8+Sun/8.13.8/vz-mnso-$Revision: 1.5 $) with ESMTP id q7HVZh0010433 for
 <name@one.domain.com>; Wed, 15 Aug 2012 17:31:35 GMT
Received: from pdcd35-snmcpe1.ip.mic.com (localhost [127.0.0.1]) by
 pdcd35-snmcpe1.ip.mic.com (8.13.8+Sun/8.14.2) with ESMTP id q7HVJtD024085
 for <name@one.domain.com>; Wed, 15 Aug 2012 17:31:19 GMT
Received: (from myname@localhost) by pdcd35-snmcpe1.ip.mic.com
 (8.13.8+Sun/8.14.2/Submit) id q7FHVJbp024084 for
 name@one.domain.com; Wed, 15 Aug 2012 17:31:19 GMT
Date: Wed, 15 Aug 2012 17:31:19 +0000
From: david.foo <myname@pdcd35-snmcpe1.ip.mic.com>
Message-ID: <201208151731.q7FHVJbp024084@pdcd35-snmcpe1.ip.mic.com>
Subject: Hi
MIME-Version: 1.0
Return-Path: myname@pdcd35-snmcpe1.ip.mic.com
X-ConvertedToMime: 1

# 13  
Old 08-16-2012
Strange. Please
a) send an e-mail interactively
b) send a simple output like ls|mail ...
c) post your text_file.txt
# 14  
Old 08-17-2012
Ok, here is my resolution;
this is the way I was doing it at first:
Code:
 
uuencode file_name.zip | mailx -s "test" my_name@domain.com

This is the right way:

Code:
 
uuencode file_name.zip fila_name.zip | mailx -s "test" my_name@domain.com

The first file_name.zip is naming the file the second file_name.zip is the actual file that you are attaching.
This User Gave Thanks to amb1s1 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Attachment in email

I have a file in unix, while i do email that file to some one from unix, the attachment file data is displaying in the email. (as body of the email). but if the file has some special characters , the file is emailing as attachment. But i need the file as the body in the email if it has special... (1 Reply)
Discussion started by: nani1984
1 Replies

2. Shell Programming and Scripting

Not able to send attachment with the email

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

3. UNIX for Advanced & Expert Users

email file as attachment...

Hello all, i am on hp-ux 11.23...i am trying to send an email as an attachement but it dose not seem to work...after reading on google i found that we can use uuencode to send file at attachement...here is my file and the syntax $ cat test.txt NAME --------- TEST $ uuencode... (7 Replies)
Discussion started by: abdul.irfan2
7 Replies

4. Shell Programming and Scripting

sending an email with attachment

Hi, Please help me in sending an e-mail with attachment through unix mailx command is not present in our unix box. (4 Replies)
Discussion started by: dudd9
4 Replies

5. UNIX for Dummies Questions & Answers

An empty attachment coming with the name of subject

Hi All, I am sending a mail with attachment only in this way. But each time with attachment comes another attachment with the name of "Testing.txt" which is just an empty text file how to remove this thing please help (uuencode ./file2.txt "Bad file")|mailx -s "Testing" maindola@rediff.com ... (7 Replies)
Discussion started by: maindola.amit
7 Replies

6. Shell Programming and Scripting

Sending Email with Attachment

Hi, I want to send an email with multiple attachment using uuencode and mail command. I am able to send with one attachment Ex:uuencode abc.txt abc.txt | mail test@test.com -s "Test3" Can anyone reply with syntax. Regards BS (3 Replies)
Discussion started by: balajiora
3 Replies

7. AIX

Email with Attachment

Hi, I have .ksh file which internally calls a .sql file. This sql file writes a file with the result. I am using the following command to send email with the result file as attachment uuencode file.txt file.txt | mail -s "Subject" abc@abc.com. When i run the .ksh file i get a message you... (5 Replies)
Discussion started by: piyushprabhakar
5 Replies

8. UNIX for Dummies Questions & Answers

how to deattach attachment of email

how to deattach attachment of email (4 Replies)
Discussion started by: kandati
4 Replies

9. UNIX for Dummies Questions & Answers

Email Attachment

Is there a way to send an email attachment? So far no where I've looked has given me any leads. (2 Replies)
Discussion started by: Cyro
2 Replies

10. UNIX for Dummies Questions & Answers

Email Attachment

Hi, I have 2 questions regarding sending mail as attachment. 1. Using mime type (From Oracle tools which reside on UNIX) When send the mail(txt file) as an attachment, on some servers like Hotmail, the email goes perfect as an attachment. But on some servers like yahoo, get embedded mail which... (2 Replies)
Discussion started by: prasad01
2 Replies
Login or Register to Ask a Question