<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: attachment code</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Wed, 08 Oct 2008 06:35:34 GMT</pubDate>
    <description>DZone Snippets: attachment code</description>
    <item>
      <title>Email in Bash</title>
      <link>http://snippets.dzone.com/posts/show/4868</link>
      <description>//Bash email&lt;br /&gt;&lt;code&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;&lt;br /&gt;function email&lt;br /&gt;{&lt;br /&gt;echo "this is a test" | mail -s "test" "$1"&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if [ "$1" = "" ]; then&lt;br /&gt;echo "nothing in param"&lt;br /&gt;else&lt;br /&gt;echo "sending mail"&lt;br /&gt;&lt;br /&gt;#emailing attachment&lt;br /&gt;#uuencode statsNbaAllStarSim statssim | mail -s "test attachement" atayebali@foxsports.com&lt;br /&gt;#uuencode &lt;filename that will be send&gt; &lt;name for attached file that is sent&gt; |&lt;br /&gt;&lt;br /&gt;#passing the param to function&lt;br /&gt;email $1&lt;br /&gt;fi&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Tue, 11 Dec 2007 00:58:01 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/4868</guid>
      <author>aniline (Aniline)</author>
    </item>
  </channel>
</rss>
