Re: Unable to received email attachments (428 Views)
Reply
Frequent Advisor
C_V
Posts: 80
Registered: ‎11-04-2008
Message 1 of 9 (627 Views)

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"
Honored Contributor
Mel Burslan
Posts: 3,214
Registered: ‎08-26-1998
Message 2 of 9 (627 Views)

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...
Frequent Advisor
C_V
Posts: 80
Registered: ‎11-04-2008
Message 3 of 9 (627 Views)

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
Honored Contributor
Michael Steele_2
Posts: 4,934
Registered: ‎08-14-2002
Message 4 of 9 (627 Views)

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
Honored Contributor
Steven Schweda
Posts: 9,091
Registered: ‎02-23-2005
Message 5 of 9 (627 Views)

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.
Respected Contributor
Wilfred Chau_1
Posts: 404
Registered: ‎12-13-2000
Message 6 of 9 (627 Views)

Re: Unable to received email attachments

try
(uuencode file.tar file.tar.txt; echo "test") | mailx -m -s "file.tar"
Esteemed Contributor
Bob_Vance
Posts: 602
Registered: ‎06-13-2000
Message 7 of 9 (627 Views)

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
Esteemed Contributor
Bob_Vance
Posts: 602
Registered: ‎06-13-2000
Message 8 of 9 (627 Views)

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
Occasional Visitor
EldoSkaria
Posts: 1
Registered: ‎06-18-2012
Message 9 of 9 (428 Views)

Re: Unable to received email attachments

the solution was clear and precise.

 

Thanks a lot.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.