- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Attempting to send email attachments from and HP-U...
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
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-15-2002 06:05 PM
07-15-2002 06:05 PM
Sending to:
Tested with MS Outlook 98 and 2000 Corporate or Workgroup editions email accounts and also to an Outlook Express 5.x.
File types:
One .jpg image
One .doc MS Word doc (format 97) to PCs with Word 97 or Word 2000.
Sendmail going through a Relay mail server.
Methods used:
1. For each
uuencode file1.jpg file1.jpg | mailx -m -s "This is a test" email@domain.com
Result: The file was embedded in the body of the email with uncomprehensible characters.
2. Text file created with input file information (let's call it /tmp/elmtst.txt) -- contents of file are the .jpg and .doc files:
[include /tmp/swagent_log.doc application/octet-stream]
[include /tmp/friend.jpg application/octet-stream]
Command line:
elm -s "This is a test" email@domain.com < /tmp/elmtst.txt
On the screen:
Result, output:
Include file has BINARY data.
Include file has BINARY data.
Include file has BINARY data.
Include file has BINARY data.
Sending mail...
Mail sent!
Result: The image file (although transfered to the server as binary file), when received in the outlook account (it is an attachment) it becomes distorted. The MS Word document cannot be opened??? (The File is sent to a PC with either Outlook 98 or 2000 and MS Word 97 or 2000 respectively -- File is in MS Word 97 format).
Things I still have to try:
Use mpack 1.5 or mutt mail client 1.4
More info about these here:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x6b3fc4c76f92d611abdb0090277a778c,00.html
Any other suggestions? Something possibly not configured correctly in sendmail or the relay server?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2002 06:57 PM
07-15-2002 06:57 PM
Re: Attempting to send email attachments from and HP-UX 11.00
Have you tried the below script
#!/usr/bin/sh
export EMAIL_TO=username@receiving.email
export EMAIL_FROM=username@sending.email
export EMAIL_SUBJECT="subject of e-mail"
export EMAIL_BODY=/tmp/body_of_e-mail
export FILE_NAME=filename.txt
export ATTACHED_FILE=/tmp/file_to_attach
{
echo To: $EMAIL_TO
echo From: $EMAIL_FROM
echo Subject: $EMAIL_SUBJECT
echo 'MIME-Version: 1.0'
echo 'Content-type: multipart/mixed; boundary="xxxxyyyzzqzzyyyxxxx"'
echo '--xxxxyyyzzqzzyyyxxxx'
echo ''
cat $EMAIL_BODY
echo '--xxxxyyyzzqzzyyyxxxx'
echo 'Content-Disposition: attachment; filename="'$FILE_NAME'"'
echo ''
cat $ATTACHED_FILE
echo '--xxxxyyyzzqzzyyyxxxx--'
} | /usr/sbin/sendmail $EMAIL_TO
HTH
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2002 07:18 PM
07-15-2002 07:18 PM
Solutionthe active answers read on the forum.
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x41950559ff7cd4118fef0090279cd0f9,00.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2002 05:35 AM
07-16-2002 05:35 AM
Re: Attempting to send email attachments from and HP-UX 11.00
> 1. For each
> uuencode file1.jpg file1.jpg | mailx -m -s "This is a test" email@domain.com
As mentioned in the other thread, do *not* use "-m"!
That sounds 'backwards'/wrong, but it causes mailx to be 'dumb' and Outlook to be 'smart', and it works (for me).
You say that you tested without "-m" and that it didn't work, but my advice/request is to try *again*, because for *me* it *does* work (details in the other thread) and perhaps you (also) made another change which caused the failure.
BTW, I think it is not wise to start another thread while your problem is not yet solved. It *is* good that you gave a summary and a pointer to the other thread, but now people have to jump between the threads to see what was (not) said in the other thread. I think that posting your summary *in* the old thread would have been better.
Also please post a pointer to this thread in the old thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2002 05:45 AM
07-16-2002 05:45 AM
Re: Attempting to send email attachments from and HP-UX 11.00
mpack should ideally work as we have the same working in our production env , you amy like to look at the following too:
http://www.stokely.com/unix.sysadm.resources/email.html#attachment.link
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2002 06:29 AM
07-16-2002 06:29 AM
Re: Attempting to send email attachments from and HP-UX 11.00
As I tell you in the other thread the problem is in the method used to transfer the files between the PC and the unix machine, try the following:
"I've got your problem trying in my system, the problem is when you transfer the gif file from windows environment to UNIX environment you transfer the file as an ascii file, then when you send it by mail obtain a corrupted file.
Try to ftp the gif file to the unix box as a binary transfer method and then send it by mail with your original instruction:
uuencode file.gif file.gif | mailx -m -s "Test" email@address.com
This must works perfect, I'd checked. "
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2002 07:31 AM
07-16-2002 07:31 AM
Re: Attempting to send email attachments from and HP-UX 11.00
Just a quick thought, last time I encountered encoding problems, I gzipped the file before attaching as a mail. Then resend as before, kind of a dodgey work around for the problem.......
Cheers,
-ChaZ-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2002 07:38 AM
07-16-2002 07:38 AM
Re: Attempting to send email attachments from and HP-UX 11.00
I've tried the mpack command and it transferred the binary file for me. That was the reason i had suggested you to download and try mpack in your last post. like i had suggested you can download and install it from the hp porting site,
http://hpux.cs.utah.edu
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2002 07:41 AM
07-16-2002 07:41 AM
Re: Attempting to send email attachments from and HP-UX 11.00
I just sent a ms-word doc file using mpack and it was received correctly on my workstation.
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2002 08:18 AM
07-16-2002 08:18 AM
Re: Attempting to send email attachments from and HP-UX 11.00
[include file.xls application/msexcel base64]
[include file.doc application/msword base64]
I don't generally send gif or jpg's, but I'll put some out on my HPUX and I'll give it a try and see if I can get the syntax worked out for you...
Rgrds,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2002 09:34 AM
07-16-2002 09:34 AM
Re: Attempting to send email attachments from and HP-UX 11.00
Well found tons of jpg files out under /opt/tngfw/browser/images/wvicons I liked earth.jpg and sent myself that file from my HPUX box to my GroupWise account and opened it up on my PC, using nothing special...and voila...it was earth !
All I used was a simple include that said..
[include ~/wvicons/earth.jpg images/jpeg base64]
Rgrds,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2002 09:45 AM
07-16-2002 09:45 AM
Re: Attempting to send email attachments from and HP-UX 11.00
I have tried the following SENDMAIL which worked!
# (echo "Subject: Your_Subject"; uuencode file1.jpg file1.jpg) | sendmail email@domain.com
Hai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2002 12:22 PM
07-16-2002 12:22 PM
Re: Attempting to send email attachments from and HP-UX 11.00
I will give consideration to each and probably attempt all. I am normally off from Tuesday through Thursday, so I probably will not try the downloads (like mpack) until that day, but I will definitely attempt the other methods, possibly from home. After I go through each and depending on my success rate I will assign due points. I will post another message once I can scream "EUREKA"!
Thanks again. By the way, Justo, all of my FTP transfers have been binary; I never transfer a file in ASCII unless I know for sure the file is simple text only; that's not the problem in my situation, but I will look into Rita's recommendations (that may be the problem!)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2002 01:59 PM
07-16-2002 01:59 PM
Re: Attempting to send email attachments from and HP-UX 11.00
Use is similar to elm, mail, mailx etc. but the attachments can be sent using the -a option.
e.g. nail [ -iInv ] [ -s subject ] [ -a attachment ] [ -c cc-addr ] [ -b bcc-addr ] [ -r from-addr ] to-addr . . .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2002 03:48 AM
07-17-2002 03:48 AM
Re: Attempting to send email attachments from and HP-UX 11.00
If I'am mailing documents to Windows as attachments, I do use the following command:
ux2dos document.whatever |uuencode document.
Hope this helps (I'm sure it works for normal text), BB.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-20-2002 06:34 AM
07-20-2002 06:34 AM
Re: Attempting to send email attachments from and HP-UX 11.00
I followed your suggestion and that did the trick. I will also look into the other applications mentioned here and will give you all points accordingly, however to send you my replies it will be a while longer. For now, Rita's suggestion was simple and worked perfectly. Thanks a lot everyone!
P.S. I know I still owe some of you points, they will come a little while later.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-21-2002 09:26 AM
07-21-2002 09:26 AM
Re: Attempting to send email attachments from and HP-UX 11.00
The mpack solution also works perfectly, just got a chance to try it today. Now I have a couple of ways to resolve our problem, mpack which I can use for single files (a very simple syntax from the command line too) and then elm for a number of files. Great! I will see about the others later (nail and mutt I think it is). Thanks everyone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2002 01:59 AM
07-22-2002 01:59 AM
Re: Attempting to send email attachments from and HP-UX 11.00
I know that it is "[include ....]", but an include in *what*? I *assume* in elm(1), but I would like to be sure. Also which version, HP-UX release, etc..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2002 02:52 AM
07-22-2002 02:52 AM
Re: Attempting to send email attachments from and HP-UX 11.00
Previously I had used A. Clay Stephenson's solution (he has always provided me with some great answers) as described below (see this forum answer -- (http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x6b3fc4c76f92d611abdb0090277a778c,00.html):
1. Create a simple text file with input file(s) information (let's call it /tmp/elmtst.txt) -- contents of file are a .jpg, .doc, and .html files:
[include /tmp/swagent_log.doc application/octet-stream]
[include /tmp/friend.jpg application/octet-stream]
[include /tmp/HotmailPage.html application/octet-stream]
Command line:
elm -s "This is a test" email@domain.com < /tmp/elmtst.txt
The include portion was either creating some altered or corrupt files. Then Rita recommended to change the [include to]...
[include /tmp/swagent_log.doc application/msword base64]
[include /tmp/friend.jpg image/jpeg base64]
[include /tmp/HotmailPage.html application/hmtl base64]
For the image I have also used: [include /tmp/friend.jpg application/jpeg base64]
Either one works perfectly!
P.S. I have an RP5470 with HP-UX 11.00
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2002 04:06 AM
07-22-2002 04:06 AM
Re: Attempting to send email attachments from and HP-UX 11.00
This is for Frank....hope you don't mind..
Here's a thread that gives some details on what I suggested. You can do a search for mail attachments too. Basically, I found an old HP document that explained using the 'include' method, when I needed to address sending reports from the UNIX boxes to end users (i.e. save paper..) and since the 'include' cost $00 - it was perfect for me !
http://my1.itrc.hp.com/cm/QuestionAnswer/0,,0x41950559ff7cd4118fef0090279cd0f9!0,00.html
Share & Enjoy !
Rita