Home » Infrastructure » Unix » send a file as an attachment.
send a file as an attachment. [message #98301] Sat, 03 July 2004 01:21 Go to next message
satya das
Messages: 6
Registered: July 2004
Junior Member
hi ,

could any one tell me how to send a file as an attachment to any inbox using unix script or any unix command.

Thanks

satya
Re: send a file as an attachment. [message #98303 is a reply to message #98301] Mon, 05 July 2004 10:19 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
uuencode abc.html abc.html | mailx -s "hello html attach" abc@yahoo.com

http://www.orafaq.com/scripts/unix/mailx.txt
http://www.orafaq.com/scripts/unix/sendmail.txt
Re: send a file as an attachment. [message #98304 is a reply to message #98303] Wed, 07 July 2004 02:38 Go to previous messageGo to next message
satya das
Messages: 6
Registered: July 2004
Junior Member
Thanks Andrew,
I could sent file using uuencode.

But how to sent file named as per
date i.e file_07072004.txt

Could u please sent me the code
for the same.

Thanks & Regards

satya das
Re: send a file as an attachment. [message #98305 is a reply to message #98304] Wed, 07 July 2004 10:25 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
Have you tried just redirecting the file in?
mailx -s "hello html attach" abc@yahoo.com < /tmp/mailbody.txt
Re: send a file as an attachment. [message #98319 is a reply to message #98301] Tue, 20 July 2004 07:43 Go to previous messageGo to next message
Tak Tang
Messages: 142
Registered: May 2004
Senior Member
If you are familiar with (or willing to read) RFC 821, 822 and 1341 (available at www.ietf.org), then you can construct a mail message and deliver it through telnet.

It is a little bit fiddly, but not really difficult.
Re: send a file as an attachment. [message #98354 is a reply to message #98305] Thu, 05 August 2004 13:19 Go to previous messageGo to next message
Gujja Karunakar
Messages: 1
Registered: August 2004
Junior Member
use the following
uuencode a.txt a.txt | mailx -s 'Email with attachment' xyz@abc.com
Re: send a file as an attachment. [message #98435 is a reply to message #98303] Tue, 05 October 2004 05:22 Go to previous message
tessie
Messages: 1
Registered: October 2004
Junior Member
doet maar
Previous Topic: sqlplus not starting
Next Topic: syncsort
Goto Forum:
  


Current Time: Tue Apr 23 16:18:32 CDT 2024