<?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: For Rita Workman (sendmail) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/for-rita-workman-sendmail/m-p/2522717#M878231</link>
    <description>Hi Laurent,&lt;BR /&gt;&lt;BR /&gt;Your not Rita but thanks for the document. I wanted this document included in a reply (not as an attachment)  so that in future someone can search the forums and find it easily, so ive included it below.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Stefan&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Command-line mailing with subject, body text and attachments &lt;BR /&gt;DocId: KBAN00000679   Updated: 20010420&lt;BR /&gt;DOCUMENT&lt;BR /&gt;PROBLEM:&lt;BR /&gt;&lt;BR /&gt;Customer wants to be able to create a script to email a binary file to a&lt;BR /&gt;distribution list, with a subject line so recipients can readily identify it,&lt;BR /&gt;and body text explaining what the attachment is and what to do with it.  To do&lt;BR /&gt;that, they need a method of creating and sending such a message.&lt;BR /&gt;&lt;BR /&gt;RESOLUTION:&lt;BR /&gt;&lt;BR /&gt;The method involves assembling a message from two separate parts, consisting of&lt;BR /&gt;a header which contains the body text and of a uuencoded attachment, then&lt;BR /&gt;sending it using the "-t" sendmail flag, which causes sendmail to scan the&lt;BR /&gt;message body for such things as addresses and the subject.&lt;BR /&gt;&lt;BR /&gt;The first part of the message is a header, which looks like this:&lt;BR /&gt;&lt;BR /&gt;To: &lt;ADDRESS or="" alias=""&gt;&lt;BR /&gt;Cc: &lt;ADDRESS or="" alias=""&gt;&lt;BR /&gt;Bcc: &lt;ADDRESS or="" alias=""&gt;&lt;BR /&gt;Subject: &lt;SUBJECT&gt;&lt;BR /&gt;&lt;BLANK line=""&gt;&lt;BR /&gt;Then beginning on this line, you write the body text you want to include.&lt;BR /&gt;&lt;ANOTHER blank="" line=""&gt;&lt;BR /&gt;&lt;BR /&gt;As you can see, the customer could easily put together a template header file&lt;BR /&gt;with variables in key positions, so a script to create and send the messages&lt;BR /&gt;could just grab the template and substitute the necessary values for the&lt;BR /&gt;variables.  It's not necessary to include bcc or cc lines if they're not going&lt;BR /&gt;to be used.&lt;BR /&gt;&lt;BR /&gt;Creating the message, then, is a matter of appropriately modifying a copy of&lt;BR /&gt;the header, and writing it to a temporary file.  Then uuencode the attachment&lt;BR /&gt;file and "&amp;gt;&amp;gt;" redirect it to the same temporary file.  Now send the contents of&lt;BR /&gt;that temporary file to sendmail, using the "-t" flag.&lt;BR /&gt;&lt;BR /&gt;For example, let's say you have a report that you always send to the same&lt;BR /&gt;people, always using the same body text and subject line.  For that you could&lt;BR /&gt;create a fixed header file, called "header" in this example.  To distribute the&lt;BR /&gt;report:&lt;BR /&gt;&lt;BR /&gt;# cp header &amp;gt; /var/tmp/mailtemp&lt;BR /&gt;# uuencode /path/datafile datafile &amp;gt;&amp;gt; /var/tmp/mailtemp&lt;BR /&gt;# cat /var/tmp/mailtemp | sendmail -t&lt;BR /&gt;# rm /var/tmp/mailtemp&lt;BR /&gt;&lt;BR /&gt;That's all.  Because of the "-t" flag, sendmail will read the header for&lt;BR /&gt;addressing and subject information.  Uuencoded files with a ".csv" suffix sent&lt;BR /&gt;in testing arrived at an Outlook client as attachments which called up Excel&lt;BR /&gt;just as they should, while the body text part of the header file arrived as&lt;BR /&gt;body text.&lt;BR /&gt;&lt;BR /&gt;Aliases were mentioned above in the description of the header.  This is part of&lt;BR /&gt;sendmail, and works whether you're sending mail using sendmail alone, or with&lt;BR /&gt;ELM or mail or mailx or any client using sendmail as a transport vehicle.&lt;BR /&gt;In /etc/mail there's a file called "aliases," and in it you can define both&lt;BR /&gt;individual aliases and mailing lists.  The basic format can be seen by just&lt;BR /&gt;looking at the file or consulting the man page for aliases(5).  To define a&lt;BR /&gt;list, you start the line with the alias for the list, then after a ":"&lt;BR /&gt;delimiter, list the addressees (full address or alias) separated by commas.&lt;BR /&gt;It's okay to add a space after the comma for clarity.  All addresses have to be&lt;BR /&gt;on the same line as the alias for the list;  a new line is taken as the end of&lt;BR /&gt;the list.  Sendmail doesn't usually use the aliases file itself, though, but&lt;BR /&gt;rather "aliases.db," so after you're done editing the aliases file you have to&lt;BR /&gt;issue the command "newaliases" to re-read the aliases file and re-write the&lt;BR /&gt;aliases.db file.&lt;BR /&gt;&lt;BR /&gt;&lt;/ANOTHER&gt;&lt;/BLANK&gt;&lt;/SUBJECT&gt;&lt;/ADDRESS&gt;&lt;/ADDRESS&gt;&lt;/ADDRESS&gt;</description>
    <pubDate>Mon, 30 Apr 2001 06:59:10 GMT</pubDate>
    <dc:creator>Stefan Farrelly</dc:creator>
    <dc:date>2001-04-30T06:59:10Z</dc:date>
    <item>
      <title>For Rita Workman (sendmail)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/for-rita-workman-sendmail/m-p/2522715#M878229</link>
      <description>A request for Rita.&lt;BR /&gt;&lt;BR /&gt;Rita wrote:&lt;BR /&gt;&lt;BR /&gt;Here's a thread that addresses a 'workaround' for sendmail to send a subject line: &lt;BR /&gt;                                  &lt;A href="http://us-support.external.hp.com/cki/bin/doc.pl/sid=b551b0eb0d495b49d7/screen=ckiDisplayDocument?docId=200000054887756" target="_blank"&gt;http://us-support.external.hp.com/cki/bin/doc.pl/sid=b551b0eb0d495b49d7/screen=ckiDisplayDocument?docId=200000054887756&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Now for another option. Have you thought of trying elm, which does have a -s "subject option". Elm uses the sendmail transport. Just a thought, &lt;BR /&gt;/rcw &lt;BR /&gt;&lt;BR /&gt;Hi Rita, &lt;BR /&gt;For those of us without a US login clicking on the above link is a pain in the glorious maximus because now my browser continually tries to connect to the US site, instead of Europe, and it takes me 10 minutes of continually repointing back to the European site before my browser remembers to stay there. Instead of the above link can you please include the actual document here (in your reply).&lt;BR /&gt;&lt;BR /&gt;Many thanks,&lt;BR /&gt;&lt;BR /&gt;Stefan&lt;BR /&gt;</description>
      <pubDate>Mon, 30 Apr 2001 06:39:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/for-rita-workman-sendmail/m-p/2522715#M878229</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2001-04-30T06:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: For Rita Workman (sendmail)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/for-rita-workman-sendmail/m-p/2522716#M878230</link>
      <description>Hi Stefan,&lt;BR /&gt;&lt;BR /&gt;attached is a copy of the document you are looking for.&lt;BR /&gt;&lt;BR /&gt;best regards,&lt;BR /&gt;&lt;BR /&gt;Laurent&lt;BR /&gt;Forums admin</description>
      <pubDate>Mon, 30 Apr 2001 06:50:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/for-rita-workman-sendmail/m-p/2522716#M878230</guid>
      <dc:creator>laurent pitoiset_1</dc:creator>
      <dc:date>2001-04-30T06:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: For Rita Workman (sendmail)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/for-rita-workman-sendmail/m-p/2522717#M878231</link>
      <description>Hi Laurent,&lt;BR /&gt;&lt;BR /&gt;Your not Rita but thanks for the document. I wanted this document included in a reply (not as an attachment)  so that in future someone can search the forums and find it easily, so ive included it below.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Stefan&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Command-line mailing with subject, body text and attachments &lt;BR /&gt;DocId: KBAN00000679   Updated: 20010420&lt;BR /&gt;DOCUMENT&lt;BR /&gt;PROBLEM:&lt;BR /&gt;&lt;BR /&gt;Customer wants to be able to create a script to email a binary file to a&lt;BR /&gt;distribution list, with a subject line so recipients can readily identify it,&lt;BR /&gt;and body text explaining what the attachment is and what to do with it.  To do&lt;BR /&gt;that, they need a method of creating and sending such a message.&lt;BR /&gt;&lt;BR /&gt;RESOLUTION:&lt;BR /&gt;&lt;BR /&gt;The method involves assembling a message from two separate parts, consisting of&lt;BR /&gt;a header which contains the body text and of a uuencoded attachment, then&lt;BR /&gt;sending it using the "-t" sendmail flag, which causes sendmail to scan the&lt;BR /&gt;message body for such things as addresses and the subject.&lt;BR /&gt;&lt;BR /&gt;The first part of the message is a header, which looks like this:&lt;BR /&gt;&lt;BR /&gt;To: &lt;ADDRESS or="" alias=""&gt;&lt;BR /&gt;Cc: &lt;ADDRESS or="" alias=""&gt;&lt;BR /&gt;Bcc: &lt;ADDRESS or="" alias=""&gt;&lt;BR /&gt;Subject: &lt;SUBJECT&gt;&lt;BR /&gt;&lt;BLANK line=""&gt;&lt;BR /&gt;Then beginning on this line, you write the body text you want to include.&lt;BR /&gt;&lt;ANOTHER blank="" line=""&gt;&lt;BR /&gt;&lt;BR /&gt;As you can see, the customer could easily put together a template header file&lt;BR /&gt;with variables in key positions, so a script to create and send the messages&lt;BR /&gt;could just grab the template and substitute the necessary values for the&lt;BR /&gt;variables.  It's not necessary to include bcc or cc lines if they're not going&lt;BR /&gt;to be used.&lt;BR /&gt;&lt;BR /&gt;Creating the message, then, is a matter of appropriately modifying a copy of&lt;BR /&gt;the header, and writing it to a temporary file.  Then uuencode the attachment&lt;BR /&gt;file and "&amp;gt;&amp;gt;" redirect it to the same temporary file.  Now send the contents of&lt;BR /&gt;that temporary file to sendmail, using the "-t" flag.&lt;BR /&gt;&lt;BR /&gt;For example, let's say you have a report that you always send to the same&lt;BR /&gt;people, always using the same body text and subject line.  For that you could&lt;BR /&gt;create a fixed header file, called "header" in this example.  To distribute the&lt;BR /&gt;report:&lt;BR /&gt;&lt;BR /&gt;# cp header &amp;gt; /var/tmp/mailtemp&lt;BR /&gt;# uuencode /path/datafile datafile &amp;gt;&amp;gt; /var/tmp/mailtemp&lt;BR /&gt;# cat /var/tmp/mailtemp | sendmail -t&lt;BR /&gt;# rm /var/tmp/mailtemp&lt;BR /&gt;&lt;BR /&gt;That's all.  Because of the "-t" flag, sendmail will read the header for&lt;BR /&gt;addressing and subject information.  Uuencoded files with a ".csv" suffix sent&lt;BR /&gt;in testing arrived at an Outlook client as attachments which called up Excel&lt;BR /&gt;just as they should, while the body text part of the header file arrived as&lt;BR /&gt;body text.&lt;BR /&gt;&lt;BR /&gt;Aliases were mentioned above in the description of the header.  This is part of&lt;BR /&gt;sendmail, and works whether you're sending mail using sendmail alone, or with&lt;BR /&gt;ELM or mail or mailx or any client using sendmail as a transport vehicle.&lt;BR /&gt;In /etc/mail there's a file called "aliases," and in it you can define both&lt;BR /&gt;individual aliases and mailing lists.  The basic format can be seen by just&lt;BR /&gt;looking at the file or consulting the man page for aliases(5).  To define a&lt;BR /&gt;list, you start the line with the alias for the list, then after a ":"&lt;BR /&gt;delimiter, list the addressees (full address or alias) separated by commas.&lt;BR /&gt;It's okay to add a space after the comma for clarity.  All addresses have to be&lt;BR /&gt;on the same line as the alias for the list;  a new line is taken as the end of&lt;BR /&gt;the list.  Sendmail doesn't usually use the aliases file itself, though, but&lt;BR /&gt;rather "aliases.db," so after you're done editing the aliases file you have to&lt;BR /&gt;issue the command "newaliases" to re-read the aliases file and re-write the&lt;BR /&gt;aliases.db file.&lt;BR /&gt;&lt;BR /&gt;&lt;/ANOTHER&gt;&lt;/BLANK&gt;&lt;/SUBJECT&gt;&lt;/ADDRESS&gt;&lt;/ADDRESS&gt;&lt;/ADDRESS&gt;</description>
      <pubDate>Mon, 30 Apr 2001 06:59:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/for-rita-workman-sendmail/m-p/2522717#M878231</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2001-04-30T06:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: For Rita Workman (sendmail)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/for-rita-workman-sendmail/m-p/2522718#M878232</link>
      <description>Hi Stefan,&lt;BR /&gt;&lt;BR /&gt;I did not realize the complication...&lt;BR /&gt;I shall endeavor to cut and past the answers in the future. Not only to address your problem, but also for those times when it's an HP doc and the other person doesn't have access to that.&lt;BR /&gt;&lt;BR /&gt;Thank you for pointing this out to me (and hopefully anyone else reading this...)&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Rita</description>
      <pubDate>Mon, 30 Apr 2001 11:01:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/for-rita-workman-sendmail/m-p/2522718#M878232</guid>
      <dc:creator>Rita C Workman</dc:creator>
      <dc:date>2001-04-30T11:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: For Rita Workman (sendmail)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/for-rita-workman-sendmail/m-p/2522719#M878233</link>
      <description>&lt;BR /&gt;Thanks Rita,&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Stefan</description>
      <pubDate>Mon, 30 Apr 2001 11:26:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/for-rita-workman-sendmail/m-p/2522719#M878233</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2001-04-30T11:26:52Z</dc:date>
    </item>
  </channel>
</rss>

