<?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: Send multiple attachments with sendmail in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032741#M757860</link>
    <description>Vidhya -&lt;BR /&gt;You have many fine examples here. Allow me to ads an additional set of examples in the attached.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;-dl</description>
    <pubDate>Wed, 14 Mar 2007 11:19:01 GMT</pubDate>
    <dc:creator>Dave La Mar</dc:creator>
    <dc:date>2007-03-14T11:19:01Z</dc:date>
    <item>
      <title>Send multiple attachments with sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032737#M757856</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I want to send multiple attachments from the sendmail utility (or any other e-mail utility in HP-UX). &lt;BR /&gt;&lt;BR /&gt;I'm able to attach one file with the following script:&lt;BR /&gt;&lt;BR /&gt;#! /usr/bin/ksh&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;&lt;BR /&gt;#For Eg. sendMail  -t user@host.com -c user1@host1.com -s subject -b body -a attach.txt&lt;BR /&gt;&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;if [ -z "$toAddress" ] || [ -z "$subject" ] || [ -z "$body" ] || [ -z "$attachment" ] &lt;BR /&gt;then&lt;BR /&gt; print "Error: To Address, Subject and Body of the mail and attachment are required arguments"     &lt;BR /&gt; exit 1&lt;BR /&gt;fi&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;fi&lt;BR /&gt;&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;if [ -n $subject ]&lt;BR /&gt;then&lt;BR /&gt; print -  'Subject:' $subject&lt;BR /&gt;fi&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 - &lt;BR /&gt;print -  "--${boundary}"&lt;BR /&gt;print -  'Content-Type: TEXT/PLAIN; charset=US-ASCII'&lt;BR /&gt;print - &lt;BR /&gt;cat $body&lt;BR /&gt;print - &lt;BR /&gt;print - &lt;BR /&gt;print -  "--${boundary}"&lt;BR /&gt;print -  'Content-Type: TEXT/PLAIN; charset=US-ASCII; name='$attachment &lt;BR /&gt;print -  'Content-Disposition: attachment;   filename='$attachment&lt;BR /&gt;print - &lt;BR /&gt;cat $attachment&lt;BR /&gt;print - &lt;BR /&gt;print -  "--${boundary}--"&lt;BR /&gt;} | /usr/lib/sendmail "${toAddress} ${ccAddress}"  &lt;BR /&gt;&lt;BR /&gt;Could any body please help me how to do it for multiple attachments? &lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Vidhya&lt;/ATTACHMENT&gt;&lt;/BODY-TEXT&gt;&lt;/SUBJECT&gt;&lt;/CC&gt;&lt;/TO&gt;&lt;/FROM&gt;</description>
      <pubDate>Thu, 08 Mar 2007 06:04:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032737#M757856</guid>
      <dc:creator>PM Srividhya</dc:creator>
      <dc:date>2007-03-08T06:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: Send multiple attachments with sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032738#M757857</link>
      <description>Hi Vidhya,&lt;BR /&gt;&lt;BR /&gt;Please see:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=708917" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=708917&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=52454" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=52454&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=79132" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=79132&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Please also read:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/helptips.do?#33" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/helptips.do?#33&lt;/A&gt; on how to reward any useful answers given to your questions.&lt;BR /&gt;&lt;BR /&gt;Your profile shows you have so far only rewarded 1 answer of 14 !&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Mar 2007 06:23:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032738#M757857</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2007-03-08T06:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Send multiple attachments with sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032739#M757858</link>
      <description>tarball all the attachments, then use uuencode.&lt;BR /&gt;&lt;BR /&gt;uuencode tarball tarball | mailx -s "subject" to@me.org</description>
      <pubDate>Thu, 08 Mar 2007 07:49:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032739#M757858</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2007-03-08T07:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Send multiple attachments with sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032740#M757859</link>
      <description>Hi,&lt;BR /&gt;by mail:&lt;BR /&gt;&lt;BR /&gt;mail -t &lt;MAILADDRESS&gt;&amp;lt;&lt;EOF&gt;&lt;/EOF&gt;Subject: test&lt;BR /&gt;From: &lt;MAILADDRESS&gt;&lt;BR /&gt;Cc: &lt;MAILADDRESS&gt;&lt;BR /&gt;bcc: &lt;MAILADDRESS&gt;&lt;BR /&gt;$(ux2dos test.txt|uuencode test.txt)&lt;BR /&gt;$(ux2dos test.html|uuencode test.html)&lt;BR /&gt;EOF&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Art&lt;BR /&gt;&lt;BR /&gt;N.B. Please remeber to assign points&lt;/MAILADDRESS&gt;&lt;/MAILADDRESS&gt;&lt;/MAILADDRESS&gt;&lt;/MAILADDRESS&gt;</description>
      <pubDate>Fri, 09 Mar 2007 04:49:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032740#M757859</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2007-03-09T04:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Send multiple attachments with sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032741#M757860</link>
      <description>Vidhya -&lt;BR /&gt;You have many fine examples here. Allow me to ads an additional set of examples in the attached.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;-dl</description>
      <pubDate>Wed, 14 Mar 2007 11:19:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032741#M757860</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2007-03-14T11:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Send multiple attachments with sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032742#M757861</link>
      <description>Thanks all for the replies. I'm using the one suggested by Art to use uuencode along with mail and it works the way i'm looking for.&lt;BR /&gt;Thanks Art... (I should have given more points to you :O))&lt;BR /&gt;</description>
      <pubDate>Sat, 24 Mar 2007 23:52:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032742#M757861</guid>
      <dc:creator>PM Srividhya</dc:creator>
      <dc:date>2007-03-24T23:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Send multiple attachments with sendmail</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032743#M757862</link>
      <description>Thanks for all replies.</description>
      <pubDate>Sat, 24 Mar 2007 23:55:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/send-multiple-attachments-with-sendmail/m-p/5032743#M757862</guid>
      <dc:creator>PM Srividhya</dc:creator>
      <dc:date>2007-03-24T23:55:00Z</dc:date>
    </item>
  </channel>
</rss>

