<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to attach the file using sendmail in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736093#M608809</link>
    <description>You could also install thunderbird.</description>
    <pubDate>Mon, 10 Jan 2011 19:11:53 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2011-01-10T19:11:53Z</dc:date>
    <item>
      <title>how to attach the file using sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736089#M608805</link>
      <description>how to attach the file using send mail command</description>
      <pubDate>Mon, 10 Jan 2011 12:53:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736089#M608805</guid>
      <dc:creator>rajesh73</dc:creator>
      <dc:date>2011-01-10T12:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to attach the file using sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736090#M608806</link>
      <description>&lt;!--!*#--&gt;There should be dozens of old threads on how&lt;BR /&gt;to use e-mail attachments.  Did you look?  A&lt;BR /&gt;Forum search for keywords like, say:&lt;BR /&gt;      mail attachment&lt;BR /&gt;should find several.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/james/home.do?from=forums" target="_blank"&gt;http://forums.itrc.hp.com/service/james/home.do?from=forums&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Also: On what?&lt;BR /&gt;&lt;BR /&gt;      uname -a</description>
      <pubDate>Mon, 10 Jan 2011 13:12:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736090#M608806</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-01-10T13:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to attach the file using sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736091#M608807</link>
      <description>HP_UX  B.11.11</description>
      <pubDate>Mon, 10 Jan 2011 14:04:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736091#M608807</guid>
      <dc:creator>rajesh73</dc:creator>
      <dc:date>2011-01-10T14:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to attach the file using sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736092#M608808</link>
      <description>&lt;P&gt;There are third party vendor software that will do it for you.&lt;BR /&gt;&lt;BR /&gt;Folks like uuencode. For myself I am a fan of the 'include' statment.&lt;BR /&gt;&lt;BR /&gt;As Steven says just search for 'mail attachments sendmail' or try 'mail attachments mime'&lt;BR /&gt;&lt;BR /&gt;Here is one to get you started..&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://h30499.www3.hp.com/t5/System-Administration/sending-attachment-using-sendmail/m-p/3852840#M275270" target="_blank"&gt;http://h30499.www3.hp.com/t5/System-Administration/sending-attachment-using-sendmail/m-p/3852840#M275270&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Rgrds,&lt;BR /&gt;Rita&lt;/P&gt;</description>
      <pubDate>Thu, 10 Nov 2011 21:42:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736092#M608808</guid>
      <dc:creator>Rita C Workman</dc:creator>
      <dc:date>2011-11-10T21:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to attach the file using sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736093#M608809</link>
      <description>You could also install thunderbird.</description>
      <pubDate>Mon, 10 Jan 2011 19:11:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736093#M608809</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-01-10T19:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to attach the file using sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736094#M608810</link>
      <description>This should do it:&lt;BR /&gt;&lt;BR /&gt;uuencode filename filename | mailx -m -s "subject line for email" address@domain.com&lt;BR /&gt;&lt;BR /&gt;and yes filename is repeated twice intentionally. fist one is the name of the file you are attaching. second is for the name of the attachment. The do not have to be the same but it helps tremendously if you keep them the same in the long run, when problems start to show up.&lt;BR /&gt;&lt;BR /&gt;hope this helps</description>
      <pubDate>Mon, 10 Jan 2011 23:40:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736094#M608810</guid>
      <dc:creator>Mel Burslan</dc:creator>
      <dc:date>2011-01-10T23:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to attach the file using sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736095#M608811</link>
      <description>Hey;&lt;BR /&gt;&lt;BR /&gt;As others have pointed out, there are numerous methods - google search would probably be enlightening.&lt;BR /&gt;&lt;BR /&gt;That being said, I created my own little cheat sheet for my favorite ways of doing just that:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.olearycomputers.com/ll/mail_attach.html" target="_blank"&gt;http://www.olearycomputers.com/ll/mail_attach.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;HTH;&lt;BR /&gt;&lt;BR /&gt;Doug</description>
      <pubDate>Tue, 11 Jan 2011 04:19:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736095#M608811</guid>
      <dc:creator>Doug O'Leary</dc:creator>
      <dc:date>2011-01-11T04:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to attach the file using sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736096#M608812</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Attached is a handy script which is used to attach PDF files and text files which uses sendmail.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Vidhya</description>
      <pubDate>Tue, 11 Jan 2011 04:41:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736096#M608812</guid>
      <dc:creator>PM Srividhya</dc:creator>
      <dc:date>2011-01-11T04:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: how to attach the file using sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736097#M608813</link>
      <description>&lt;!--!*#--&gt;Oops.. attachment is missed! Due to some reason attachment is not working.. Posting the script down.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#! /usr/bin/ksh&lt;BR /&gt;###########################################&lt;BR /&gt;###########################################&lt;BR /&gt;################&lt;BR /&gt;# Filename : sendMail&lt;BR /&gt;# Description : To send a mail to a user with an attachemnt&lt;BR /&gt;# Arguments :       -f &lt;FROM address=""&gt; -t &lt;TO address=""&gt; -c &lt;CC address=""&gt; -s &lt;SUBJECT&gt; -b &lt;BODY-TEXT variable=""&gt; -a &lt;ATTACHMENT filename=""&gt;&lt;BR /&gt;# Author :  P.M. Srividhya&lt;BR /&gt;# Date  : 6-March-2007&lt;BR /&gt;#&lt;BR /&gt;#For Eg. sendMail  -f -t user@host.com -c user1@host1.com -s subject -b body -a attach.txt&lt;BR /&gt;#############################################&lt;BR /&gt;###########################################&lt;BR /&gt;##############&lt;BR /&gt;export PATH=$PATH:/usr/bin:/usr/sbin:/usr/lib&lt;BR /&gt;if [ $# = 0 ]&lt;BR /&gt;then&lt;BR /&gt; print "Usage:  $0 -f fromuser -t user@host.com -c user1@host1.com -s subject -b body -a attach.txt [optional]"&lt;BR /&gt; exit 1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;while getopts 'f:t:c:s:b:a:' opt&lt;BR /&gt;do&lt;BR /&gt; case $opt in&lt;BR /&gt; f)&lt;BR /&gt;  fromAddress=$OPTARG&lt;BR /&gt;  ;;&lt;BR /&gt; t)&lt;BR /&gt;  toAddress=$OPTARG&lt;BR /&gt;  ;;&lt;BR /&gt; c)&lt;BR /&gt;  ccAddress=$OPTARG&lt;BR /&gt;  ;;&lt;BR /&gt; s)&lt;BR /&gt;  subject=$OPTARG&lt;BR /&gt;  ;;&lt;BR /&gt; b)&lt;BR /&gt;  body=$OPTARG&lt;BR /&gt;  ;;&lt;BR /&gt; a)&lt;BR /&gt;  attachment=$OPTARG&lt;BR /&gt;  ;;&lt;BR /&gt; :)&lt;BR /&gt;  print "$OPTARG need an argument"&lt;BR /&gt;  exit 1&lt;BR /&gt;  ;;&lt;BR /&gt; \?)&lt;BR /&gt;  print "$OPTARG need a value"&lt;BR /&gt;  exit 1&lt;BR /&gt;  ;;&lt;BR /&gt; esac&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;body="$(echo $body)"&lt;BR /&gt;&lt;BR /&gt;if [ -z "$fromAddress" ] || [ -z "$toAddress" ] || [ -z "$subject" ] || [ -z "$body" ]&lt;BR /&gt;then&lt;BR /&gt; print "Error: From Address, To Address, Subject and Body of the mail are required arguments"&lt;BR /&gt; exit 1&lt;BR /&gt;fi&lt;BR /&gt;if [  ! -z "$attachment" ]&lt;BR /&gt;then&lt;BR /&gt; if [ ! -f $attachment ] || [ ! -r $attachment ]&lt;BR /&gt; then&lt;BR /&gt;  print  "$attachment is not a readable file"&lt;BR /&gt;  exit 1&lt;BR /&gt; else&lt;BR /&gt;  filename=$(/usr/bin/basename $attachment)&lt;BR /&gt;  fileextn=$(echo $filename | cut -f2 -d ".")&lt;BR /&gt;  typeset -l fileextn=$fileextn&lt;BR /&gt; fi&lt;BR /&gt; if [ "$fileextn" = "pdf" ]&lt;BR /&gt; then&lt;BR /&gt;  filetype="ACROBAT"&lt;BR /&gt; else&lt;BR /&gt;  filetype="TEXT/PLAIN"&lt;BR /&gt; fi&lt;BR /&gt; boundary='=== This is the boundary between parts of the message. ==='&lt;BR /&gt; {&lt;BR /&gt; print -  "From: &amp;lt;${fromAddress}&amp;gt;"&lt;BR /&gt; print -  "To: &amp;lt;${toAddress}&amp;gt;"&lt;BR /&gt; print -  "Cc: &amp;lt;${ccAddress}&amp;gt;"&lt;BR /&gt; print -  'Subject:' $subject&lt;BR /&gt; print -  'MIME-Version: 1.0'&lt;BR /&gt; print -  'Content-Type: MULTIPART/MIXED; '&lt;BR /&gt; print -  '    BOUNDARY='\"$boundary\"&lt;BR /&gt; print -&lt;BR /&gt; print -  "--${boundary}"&lt;BR /&gt; print -&lt;BR /&gt; print -  $body&lt;BR /&gt; print -&lt;BR /&gt; print -  "--${boundary}"&lt;BR /&gt; print -  'Content-Type: '$filetype'; charset=US-ASCII; name='$filename&lt;BR /&gt; print -  'Content-Disposition: attachment;   filename='$filename&lt;BR /&gt; print -  'Content-Transfer-Encoding: 7bit'&lt;BR /&gt; print -&lt;BR /&gt; cat $attachment&lt;BR /&gt; print -&lt;BR /&gt; print -  "--${boundary}--"&lt;BR /&gt;} | sendmail  "${toAddress} ${ccAddress}"&lt;BR /&gt;else&lt;BR /&gt;mail -t $toAddress &amp;lt;&amp;lt; EOF1&lt;BR /&gt;Subject: $subject&lt;BR /&gt;From: $fromAddress&lt;BR /&gt;Cc: $ccAddress&lt;BR /&gt;$body&lt;BR /&gt;EOF1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;exit 0&lt;BR /&gt;&lt;/ATTACHMENT&gt;&lt;/BODY-TEXT&gt;&lt;/SUBJECT&gt;&lt;/CC&gt;&lt;/TO&gt;&lt;/FROM&gt;</description>
      <pubDate>Tue, 11 Jan 2011 04:43:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-attach-the-file-using-sendmail/m-p/4736097#M608813</guid>
      <dc:creator>PM Srividhya</dc:creator>
      <dc:date>2011-01-11T04:43:32Z</dc:date>
    </item>
  </channel>
</rss>

