Operating System - HP-UX
1753464 Members
4638 Online
108794 Solutions
New Discussion юеВ

Re: Unable to received email attachments

 
C_V
Frequent Advisor

Unable to received email attachments

Hi Guys,

Please advise regarding this issue, i am able to sent email and is being received but the attachment is missing.

I use this code.

uuencode file.tar file.tar | mailx -s "file.tar"
8 REPLIES 8
Mel Burslan
Honored Contributor

Re: Unable to received email attachments

try this :

uuencode file.tar file.tar | mailx -m -s "file.tar"

-m means "Do not add MIME header lines". Newer versions of Micro$oft exchange, for some reason, do not like these headers, as I came to realize.

Hope this helps
________________________________
UNIX because I majored in cryptology...
C_V
Frequent Advisor

Re: Unable to received email attachments

Hi thanks for the reply but still no attachment is received. test email content is just


begin 644 file.tar
4=&AI`
end
Michael Steele_2
Honored Contributor

Re: Unable to received email attachments

The only thing I see is the bin file retaining a tar format extension, else, this works for me.

uuencode file.tar file.bin| mailx -s "file.tar"

-or just--

uuencode file.tar file | mailx -s "file.tar"

Unless its that the tar format that can't be converted. Try a plan ascii file.
Support Fatherhood - Stop Family Law
Steven Schweda
Honored Contributor

Re: Unable to received email attachments

A Forum search for keywords like, say,
e-mail attachment
should find many old threads on this topic.

> [...] is being received but the attachment
> is missing.

It "is being received" where? Read using
what? Note that this (very old) "uuencode"
scheme does not yield a MIME-compliant
message, and some modern e-mail client
programs may not know what to do with it.
MIME-compliant alternatives exist.
Wilfred Chau_1
Respected Contributor

Re: Unable to received email attachments

try
(uuencode file.tar file.tar.txt; echo "test") | mailx -m -s "file.tar"
Bob_Vance
Esteemed Contributor

Re: Unable to received email attachments

I have attached a little script that I wrote a while back that can be used, tweaked, or perused for ideas.

The script runs on HPUX and Linux.

It creates a multipart mime email, and can support a body, as well as an attachemnt.
The attachment can be any file, binary or text.


## mail_mime_attachment -h

usage: mail_mime_attachment \
[-s subject] \
[-b ] # body of e-mail file \
# if no -b, then uses standard input
-A # the file to be attached \
[-c CC: address] \
[-bc BCC: address] \
-t addressee name \
-a e-mail address


It uses sendmail directly.

It also uses 'base64', which is not part of HPUX, but which can be downloaded for free and 'make'ed, if you have a C compiler.


bv
"The lyf so short, the craft so long to lerne." - Chaucer
Bob_Vance
Esteemed Contributor

Re: Unable to received email attachments

Here's an HPUX binary of base64 that runs on PArisc and Itanium 11.23 and 11.31. Probably runs on 11.11, as well.


bv
"The lyf so short, the craft so long to lerne." - Chaucer
EldoSkaria
Occasional Visitor

Re: Unable to received email attachments

the solution was clear and precise.

 

Thanks a lot.