- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Not able to attach any file using mailx
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2006 08:18 PM
11-06-2006 08:18 PM
Not able to attach any file using mailx
I want to send the output of a script to my email id ,
I am not able to attch that file.
# cat test.log | mailx -s "log file" praveen@company.com
I am getting the output on my email id as a message not an attachment.
while i want to get test.log file as an attachment.
I tried with uuencode.
# uuencode test.log | mailx -s "attached log file" praveen2company.com
this is a continous process and i need to kill it using
(Interrupt -- one more to kill letter)
Null message body; hope that's ok
root@grouse:[/opt/cpu_mem/cpumem_logs]
#
Please suggest
how to attach a file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2006 08:22 PM
11-06-2006 08:22 PM
Re: Not able to attach any file using mailx
please try:
uuencode test.log test.log | mailx -s "attached log file" praveen2company.com
See "man uuencode"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2006 09:29 PM
11-06-2006 09:29 PM
Re: Not able to attach any file using mailx
if you are willing t use another took here is a proven production program:
http://www.hpux.ws/mailfile2
Note that smtp gateway software that is not properly patched will destroy attachments sent even by this fine program.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2006 09:55 PM
11-06-2006 09:55 PM
Re: Not able to attach any file using mailx
Pete has the right syntax ... use it
uuencode test.log test.log | mailx -s "attached log file" praveen@company.com
I have just edited the email address part for clarity.
Provide points to PETE for his solution text.
Regards,
Vinod
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2006 10:53 PM
11-06-2006 10:53 PM
Re: Not able to attach any file using mailx
I tried with
#uuencode test.log test.log | mailx -s "attached log file" praveen@company.com
Now i got the hash # prompt again, it looks that commands has sucessfullu completed.
But I am not getting any mail.
while I am getting mail using....but not an attachment..
# cat test.log | mailx -s "log file" praveen@company.com
Please suggest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2006 11:11 PM
11-06-2006 11:11 PM
Re: Not able to attach any file using mailx
If you just want to attach a log file for one time and you don't mind to attach it interactively, you can use elm instead of mailx.
You can also attach a file which sendmail command by writing a mail header
Yang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 10:39 AM
11-07-2006 10:39 AM
Re: Not able to attach any file using mailx
Regards,
-dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 10:50 AM
11-07-2006 10:50 AM
Re: Not able to attach any file using mailx
You can download it from http://hpux.connect.org.uk and it works too good to send files as an attachment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 08:16 PM
11-07-2006 08:16 PM
Re: Not able to attach any file using mailx
what's happend is that Microsoft chnage the echange server and now to be able to see your file as attachment you can use:
1. add the -m flag to your mailx
2. create a file .mailrc in your $HOME directory:
cat<
set mimeheader=no
EOF
The second solution is better because you will avaoid to chnage all your script adding -m flag.
HTH,
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 10:32 PM
11-07-2006 10:32 PM
Re: Not able to attach any file using mailx
I tried with this command:
# ux2dos /path_to/some_file | uuencode some_file.txt | mailx -m -s "MAIL FROM Someone" someone@somewhere.com
This command is working but only for *.txt files, not for any *.csv and *.xls files.
Please suggest.
I have also installed mpack utility,
can anybody please let me know how to use it?
I countnot get more information from man pages of mpack.
please suggest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2006 11:19 PM
11-07-2006 11:19 PM
Re: Not able to attach any file using mailx
Try sendmail instead of mailx
uuencode test.log test.log | sendmail praveen@company.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2006 10:08 AM
11-08-2006 10:08 AM
Re: Not able to attach any file using mailx
uuencode local_file local_file.html" | mailx -s "Subject" someone@somewhere.com
Regards,
-dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2006 10:09 AM
11-08-2006 10:09 AM
Re: Not able to attach any file using mailx
Should have read -
uuencode local_file local_file.html | mailx -s "Subject" someone@somewhere.com
-dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2006 11:11 PM
11-08-2006 11:11 PM
Re: Not able to attach any file using mailx
# ux2dos /path_to/some_file | uuencode some_file.txt | mailx -m -s "MAIL FROM Someone" someone@somewhere.com
but now I am not able to send the message body,
I am opening a new thread...."Not able to mail message body & attachment together"
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1075053
Thanks for your help