This is a discussion on sending email attachment via command line on HPUX11 to an external address within the HP-UX Operating System forums, part of the Unix Operating Systems category; --> Hello I am having trouble with sending an email attachment from the command line to an external email address(one ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello I am having trouble with sending an email attachment from the command line to an external email address(one which is not work related). When the email is sent the external recipient gets it but the attachment is in the main body of the email. Yet when the email is sent to an internal company address the attachment is in the correct place. This is what I have used ux2dos report.csv | uuencode report_a.csv | mailx -m -s "report info" external@company.outthere Any ideas? Regards Stevan |
| |||
| I send email attachment this way... /usr2/baanIV/script/cstocs il2 1250 /netbackup/nakup/file > /tmp/file uuencode /tmp/file file | mailx -s 'Subject' username@neco.cz rm /tmp/file -- Pavel K. <stevan.popovic@orange.net> píse v diskusním príspevku news:1137582298.639156.296780@z14g2000cwz.googlegr oups.com... > Hello > > I am having trouble with sending an email attachment from the command > line to an external email address(one which is not work related). When > the email is sent the external recipient gets it but the attachment is > in the main body of the email. Yet when the email is sent to an > internal company address the attachment is in the correct place. > > This is what I have used > > ux2dos report.csv | uuencode report_a.csv | mailx -m -s "report info" > external@company.outthere > > Any ideas? > > Regards > > Stevan > |
| |||
| stevan.popovic@orange.net wrote: > I am having trouble with sending an email attachment from the command > line to an external email address(one which is not work related). When > the email is sent the external recipient gets it but the attachment is > in the main body of the email. Yet when the email is sent to an > internal company address the attachment is in the correct place. So is your border mail gateway doing something funny to the mail then? A virus scanner that disassembles the message, scans the attachments and then tries to reassemble it, maybe? Besides ... are you using similar client applications for reading the mail? They'll often behave very differently ... > This is what I have used > ux2dos report.csv | uuencode report_a.csv | mailx -m -s "report info" > external@company.outthere > Any ideas? Some, although that command line does look just fine and it _should_ work. One, I would say that such an uuencoded attachment _is_ in the main body of the message, if things are working corretly, but the mail client may be found to display it otherwise anyway. What are you using there? Two, I have seen uuencoded attachments treated _really_ oddly in scanners that expect MIME format. All too many tools only know how to handle one of the formats. Too bad that there's no MIME-aware equivalent to mailx in HP-UX by default ... -- Mikko Nahkola <mnahkola@trein.ntc.nokia.com> #include <disclaimer.h> #Not speaking for my employer. No warranty. YMMV. |
| |||
| Mikko Nahkola schrieb: > stevan.popovic@orange.net wrote: > > >> This is what I have used >> ux2dos report.csv | uuencode report_a.csv | mailx -m -s "report info" >> external@company.outthere >> Any ideas? > > Some, although that command line does look just fine and it _should_ > work. > Maybe it will work if it doesn't just look fine, but has a second parameter for uuencode (uuencode xx xx) as in Pavels example ? Paul |
| |||
| Paul Seyfried wrote: > Mikko Nahkola schrieb: >> stevan.popovic@orange.net wrote: >> >> >>> This is what I have used >>> ux2dos report.csv | uuencode report_a.csv | mailx -m -s "report info" >>> external@company.outthere >>> Any ideas? >> >> Some, although that command line does look just fine and it _should_ >> work. >> > Maybe it will work if it doesn't just look fine, but has a second > parameter for uuencode (uuencode xx xx) as in Pavels example ? He also had the uuencode read it from a temporary file, not STDIN, didn't he? If there's only one argument, it reads from STDIN, if two, it reads from a file specified in the first argument: SYNOPSIS uuencode [source] remotedest uudecode [file] DESCRIPTION uuencode and uudecode can be used to send a binary file to another machine by means of such services as elm(1), mailx(1), or uucp(1) (see elm(1), mailx(1), and uucp(1)). uuencode takes the named source file (default standard input) and produces an encoded version on the standard output. The encoding uses only printing ASCII characters, includes the original mode of the input file, and preserves the value of the remotedest argument which is the intended name for the file when it is restored later on the remote system. Heh, the BSD-descended uuencode man page (on some Linuxes and such) has one example and it reads from STDIN (pipe); the one on HP-UX has one example and it reads from a file. -- Mikko Nahkola <mnahkola@trein.ntc.nokia.com> #include <disclaimer.h> #Not speaking for my employer. No warranty. YMMV. |
| |||
| Hello I tried Pavels method of sending the attachment to an external address. But the same thing happens attachment is in body of the message. When it is sent to an internal address then the attachment displays perfectly fine. |
| |||
| Hi Crveni > I tried Pavels method of sending the attachment to an external address. > But the same thing happens attachment is in body of the message. When > it is sent to an internal address then the attachment displays > perfectly fine. Perhaps the mailreader of the external adress does not understand uuencoding. You may try mimencode (its not HPUX, but was available in the portingcenter). There was also mpack and mimekit. Florian |
| |||
| try ux2dos report.csv | uuencode report_a.csv report_a.xxx | mailx -m -s "report info" exter...@company.outthere if this resolves the problem , then delete 'csv' extention from windows registers or edit it. thanks Michael |
| ||||
| "Michael" <mxayahoo@gmail.com> writes: > try > > ux2dos report.csv | uuencode report_a.csv report_a.xxx | mailx -m -s > "report info" exter...@company.outthere > if this resolves the problem , then delete 'csv' extention from windows > registers or edit it. hi! Actually that doesn't send an attachment, but an enclosure. While this still works in a UNIX environment, it's considered obsolete in the MIME world. For Linux there's a "uuenview" that builds proper MIME attachments. I've also written a primitive program that will build messages with attached files. Regards, Ulrich > > thanks > Michael |