- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to send attachments in a folder
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
Discussions
Discussions
Discussions
Forums
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
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
тАО10-07-2005 08:59 PM
тАО10-07-2005 08:59 PM
Thanks in advance for your help.
i am able to use mailx to send mail with attachments (2).
What i would like to do is to be able to sending mail from a folder with 6 or 7 files ( the folder name and file names are dynamic and changing daily)as attachments.
Can someone help me please?
Regards,
Tom
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2005 10:35 PM
тАО10-07-2005 10:35 PM
SolutionTEMPFILE=/tmp/temp$RANDOM
if [ -a $TEMPFILE ]
then
rm $TEMPFILE
fi
FOLDERNAME=/Some/Folder
cd $FOLDERNAME
for file in `ls`
do
uuencode $file $file >> $TEMPFILE
done
cat $TEMPFILE | mailx -m -s "Subject line here" user@domain.com
rm $TEMPFILE #if you wish
note that, this will not deliver the files to the recipient as a single folder as there is no such concept in exchange servers, only files can be atached, not folders. So, the recipint will get a message with multiple attachments.
I tested with 2 files and it works
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-08-2005 06:13 PM
тАО10-08-2005 06:13 PM
Re: how to send attachments in a folder
Thanks Mel Burslan FOR YOUR HELP
#!/sbin/sh
TEMPFILE=/tmp/tomtest
if [ -a $TEMPFILE ]
then
rm $TEMPFILE
fi
FOLDERNAME=/tmp/perf*
cd $FOLDERNAME
for file in `ls`
do
uuencode $file $file >> $TEMPFILE
done
cat $TEMPFILE |mailx -m -s "testing" tquach@sunrider.com
--somehow this line
uuencode $file $file >> $TEMPFILE
it appended all contents of files to this file $TEMPFILE
an so there is no attachment.
the " perf* " is a dynamic folder.
Would you please advice.
Thanks,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-09-2005 06:35 AM
тАО10-09-2005 06:35 AM
Re: how to send attachments in a folder
I have tested this script with a folder with 2 files in it and and I have received, on my exchange server account, 2 files attached to an email message.
and the random number makes your temp file a different name every time it runs. Of course there is a chance of getting the same random number, so, you are strongly encouraged to run the "rm" command once you are done with a batch of files to remove the temp file.
hope this helps.
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-09-2005 11:45 AM
тАО10-09-2005 11:45 AM
Re: how to send attachments in a folder
Then use this script to send them as an attachment:
http://www.hpux.ws/mailfile2
Do take note of the fact that smtp relay programs that are not properly patched can and have made it impossible to send attachments. If my script doesn't work (this is my improvement on an HP doc), check that your smtp relay or mail engine is up to date.
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
тАО10-09-2005 08:37 PM
тАО10-09-2005 08:37 PM
Re: how to send attachments in a folder
Mel, your script works. The reason, it did not work before, because the size of file hit the limit on my Unix server. tested it with many smaller files and it works as expected. Tested the same file using yahoo account sent to my exchange account and received it without a problem. So my Unix server is the source of the problem.
Does anyone know how to increase the size limit to send out mail from hpux.
Thanks,
Tom
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-09-2005 08:43 PM
тАО10-09-2005 08:43 PM
Re: how to send attachments in a folder
# Maximum message size (option MaxMessageSize): #
# #
# This option restricts the maximum message (in bytes) that sendmail will #
# accept from a remote system. If a message larger that this limit is #
# originated form the local system, the message will be truncated to the #
# limit. #
# #
# To enable this feature uncomment the line: #
# #
# O MaxMessageSize=100000 #
# #
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-10-2005 05:08 PM
тАО10-10-2005 05:08 PM
Re: how to send attachments in a folder
Hi-Arun:
Change it to 15Mb but it still won't send out mail larger than 4.5Mb
I am using mailx.
Any help appreciated.
Regards,
Tom