- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- send attachment in batch with elm ? is it possib...
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
07-25-2003 03:49 PM
07-25-2003 03:49 PM
send attachment in batch with elm ? is it possible
But can't do it, from reading %man I start thinking that it not possible at all ? Am I right ? I've got sample from one buddy :
(in shell)
....
elm -s "$SUBJECT" -i $ATTFILE -a $MAILTO < $BODY >>$LOGFILE
....
My logfile says:
if elm can't do this, anybody give me lead what command can.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2003 03:55 PM
07-25-2003 03:55 PM
Re: send attachment in batch with elm ? is it possible
http://hpux.ee.ualberta.ca/hppd/hpux/Users/mpack-1.5/
"mpack/munpack version 1.5 for unix
Mpack and munpack are utilities for encoding and decoding
(respectively) binary files in MIME (Multipurpose Internet Mail
Extensions) format mail messages. For compatibility with older forms
of transferring binary files, the munpack program can also decode
messages in split-uuencoded format.}"
Great for attaching any kind of document...
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2003 03:56 PM
07-25-2003 03:56 PM
Re: send attachment in batch with elm ? is it possible
Or you can use the cool script I'm attaching.
Enjoy.
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
07-25-2003 04:10 PM
07-25-2003 04:10 PM
Re: send attachment in batch with elm ? is it possible
Attached is the gist of what you wnat in your scripts. This is a down and dirty cheat sheet for our new scipters.
Best of luck.
Regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2003 04:14 PM
07-25-2003 04:14 PM
Re: send attachment in batch with elm ? is it possible
It only does attachments interacively.
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
07-25-2003 04:20 PM
07-25-2003 04:20 PM
Re: send attachment in batch with elm ? is it possible
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 04:25 AM
07-28-2003 04:25 AM
Re: send attachment in batch with elm ? is it possible
Rita C Workman
August 09, 2000 20:04 PM GMT [ unassigned ]
--------------------------------------------------------------------------------
I've seen similar requests for this on other messages...and I have sent this before. So I'm sending it again to you...Yes- you can send a file as a TRUE file attachment and actually preserve what the file is...here is the info:
First make sure you at least have Elm 2.4 on your box, and my example is for a HPUX 10.20 (you need MIME capability) so be sure you have patch PHNE_15835 (it doesn't cause a reboot to load).
The next thing you have to do is create a small file (ex include.file) that is used to send the file as an attachment. There are a few things you could read on this for more details at HP's IT Resource if you want. But simple create a file with this syntax:
[include text.txt text/plain base64]
where text.txt is your file.
The general format is: [include filename type/subtype encoding]
type/subtype= text/plain, image/gif, image/jgp etc..
encoding=base64, quoted-printable etc...
Another example might be for a Word doc:
[include file.doc application/msword base64]
Now from the command line to send this file as an attachment to user_abc:
elms -s 'Test attachment file' user_abc@your_org.com
What this did was email to user_abc@your_org.com the file test.txt with a subject line of Test attachment file. If you sent a Word doc it would come across and be a Word file attachment. It works.
You can do it with text files; image.jpg or gif files; and more. Just change the include stmt like.....And you can use this and build it right into job streams, so you can then email reports and files when batch jobs are done....It's a real paper saver.
If you want to do some lookups on IT Resource for more info.
Coleman Blake
Peace Corps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 07:42 AM
07-28-2003 07:42 AM
Re: send attachment in batch with elm ? is it possible
Within the body of your email add this:
------------------------------------
This is my text. How are you?
[include /tmp/myattach application/octet-stream base64]
This is some more text in the middle.
[include /tmp/myexcel.xls application/ms-excel base64]
This is a closing message in the email.
----------------------------------------
That will attach /tmp/myattach and /tmp/myexcel.xls. You can include multiple attachments using this method. If you are running 10.20 make sure that you have a MIME enabled version of elm (PHNE_15835 or later).
Then to use it from a script:
elm -s "My Subject" user@mailserver.com < myletter
Where myletter contains the attachment include statement as well as your message text. It is also necessary that you have a .elm directory
under the senders home directory because unlike the interactive version of elm the command-line version will not create a .elm directory automatically.
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 08:13 AM
07-28-2003 08:13 AM
Re: send attachment in batch with elm ? is it possible
I just stress that I need do it running cron shell, NOT from command line, and file should be as a real attachment.
Running shell:
ux2dos /home/devel/att | uuencode att.text | mailx -m -s $SUBJECT $MAILTO < $BODY
I got the following as a system output on my terminal:
===============================================
Develd01 [/home/devel]
$ UNIX... User unknown
from... User unknown
/home/devel/dead.letter... Saved message in /home/devel/dead.letter
^C
dead.letter file doesn???t give any exceptions and email comes to proper $MAILTO address with $BODY text but without attachment att.txt + my subject from $SUBJECT replaced with just ???mail??? (probably originated by system).
Will keep all posted. Thanks to all.
Send it, alive or dead !!
Vittorio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 08:18 AM
07-28-2003 08:18 AM
Re: send attachment in batch with elm ? is it possible
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 08:49 AM
07-28-2003 08:49 AM
Re: send attachment in batch with elm ? is it possible
When you mentioned
Also so far I'm running my shell from command line making first
Include att text/plain base64
Elm ???s $SUBJECT $MAILTO < att
Thanks
Vittorio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 09:43 AM
07-28-2003 09:43 AM
Re: send attachment in batch with elm ? is it possible
See my above posting that illutrates how to use an include cluase within the body of the email. It is also necessary to create a .elm directory in the sender's home directory because the command-line version of elm will not automatically create a .elm directory if one is not found.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2003 10:22 AM
07-28-2003 10:22 AM
Re: send attachment in batch with elm ? is it possible
elms -s "test message touser@any.com < from-include.file
We found using the include file method works for anything we need to send...and it works well when you have to script it in for daily mails too...from Word documents to tiff files, etc. And the software is free and already on your server from version 11.0 on......(MIME..).
Glad to see Clay even likes it...
Kindest Regards,
Rita