UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 6th, 2006, 03:56 AM
jm58 jm58 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 5 jm58 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 6 sec
Reputation Power: 0
Mail with attachment

hi
i have a script in sh/ksh
in the script i am making 2 files that i want to mail out at the end of the script
one file need to be an attachment and the other should be the body of the mail

i have tried to find a way do to it and the only way i found worked on SUN and AIX platform

i need my script to run on HP-UX and HP-ITANIUM also

my mail commands that i have on my servers are:
mail ,mailx,sendmail

the method i found is as follows:

attach_file=attchment.txt #the attachment
body=output.txt #the body
uuencode $attach_file $attach_file > temp_attachment
cat $body $temp_attachment > combination_file
mail -s "the subject" <mail_to> < combination_file
rm -fr temp_attachment combination_file

again this works only in AIX and SUN

please help to provide some solution for HP platform

10x

Reply With Quote
  #2  
Old April 6th, 2006, 06:06 AM
jm58 jm58 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2006
Posts: 5 jm58 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 6 sec
Reputation Power: 0
the problem is with the flag -m
-m Do not add MIME header lines Mime Version, Content
Type & Content Encoding to the header information
while sending mails.

in HP we need to add flag -m to mailx command
in SUN and AIX this is the default

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Mail with attachment


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT