I think I am getting the gist.
I am able to encode and decode a file on Unix, and it works fine.
However, if I mail the encoded file, save that email message, ftp it back to unix and then try and decode it, I can't. It says Line too long. ( I got rid of the extra email header stuff ).
I think it may have to do with the extra ^M ( \r\n ) that gets put on in the windows email client or system.
I tried to get rid of that also, no joy.
... and decode it, I can't. It says Line too long. ( I got rid of the extra email header stuff ).
Not sure how you uudecode it, but if I -
(a) mail an attachment to my own Linux user
(b) view it using "mail" command
(c) save the email, as a text file, in my current directory in Linux
(d) run uudecode on that text file
then I get the original attachment "test.tar.gz" back. Even when the headers and all are seen in the text file.
Shown below -
Quote:
...
I think it may have to do with the extra ^M ( \r\n ) that gets put on in the windows email client or system.
I tried to get rid of that also, no joy.
Any further ideas about that ??
...
Not sure why you'd want to "save email in Windows, ftp back to *nix, uudecode back to original attachment".
If you are able to send the view the attachment correctly (in Windows), then your purpose is served, isn't it ?
In any case - I do not have that kind of set up (emails to Internet addresses) in my Linux box, but I'd say try this -
(1) Send the attachment to a *nix user in your *nix box.
(2) Send the same email to an Internet address.
(3) Download, save and ftp the email back to *nix.
(4) Save the email sent in Step (1) to a local directory in *nix.
(5) Do a diff between the files in (3) and (4). Quite possibly, the Windows mail agent adds some extra stuff.
Thanks for all the replies !!
I think I got it worked out.
The remaining crux of my problem was what windows was doing to the file. once I stripped the \r off of each line, and added a \n to the last character of the file ( that windows stripped off ), it seemed to work fine.
Great stuff, great forum.
thanks again !!
Floyd
---------- Post updated at 06:05 PM ---------- Previous update was at 05:40 PM ----------
Quirkasaurus,
Just wanted to let you know, that this is the best one yet.
I didn't even have to do any decoding when it went back over to the unix side. Worked like a charm.
Thanks much.
Floyd
Quote:
Originally Posted by quirkasaurus
i remember wrestling with this problem years ago...
in order to receive the email, and see the "uuencode" output as an attachment, I believe you needed something like this:
That 'content-type: binary;' is wrong but . . .
there was some way of telling sendmail that the second "content" was an attachment.
Darned if I can recall what it was or find it though....
But the email ~did~ show up with the standard attachment, and not the uuencoded stuff.
But if someone could check the output of the perl module: Sendmail.pm then we'd have the answer.
I need something to say if these two file extensions exist in this directory *err and *rpt
zip up these files into one zip file and email them to me.
If they don't exist wait 2 hours and check again.... Not sure how to determine if I need to do an if then statement or a while true or a for... (1 Reply)
Hello *nix specialists,
Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Hello,
I have a .dat file containing one line. I need a script to read that line and make it part of the body and send a mail... Let's say the line is $line. I need the script to send a mail with the body "The last disposal feed is $line".
Thanks (4 Replies)
Hi,
We have been trying to send mail with attachment and it is going fine, but when we try to attach a text to the body of the email, we find that the mail is going fine with the body text but the attachment is not going through. We are using ksh.
The command that is successfull without the... (6 Replies)
Hello
I have to attach multiple file as an email attachment. here is what i my understanding so far:
1. search in a certain directory that is there any specific file say for example .xml file exist or not
2. if exist then take those file name from the folder and attach it to another text... (1 Reply)
Hi,
How to attach a tar file using shell script or the command liine..
I following command just send the mail to the person with .txt file as body, I want to send it as attachment.
/usr/sbin/sendmail -f "user1@daemon.com" user2@daemon.com <hi.txt
The contents of the hi.txt will be... (1 Reply)
In shell script how can I attach a file and send a mail.
suppose if I written like the following way
usr/bin/mail 'subject" "mail_id" < file.
a mail goes to the mail-id with the content of file.But I want the file to be atttached to the mail.How can I get it.is there any way for this.
... (9 Replies)