<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=459373723-29032006><FONT face=Arial 
color=#0000ff size=2>Sorry, I glossed over you wanting to send 
attachments.  The Perl MIME::Lite package is better for large 
attachments.  Also  <A 
href="http://alma.ch/perl/Mail-Sendmail-FAQ.html#attachments">http://alma.ch/perl/Mail-Sendmail-FAQ.html#attachments</A> shows 
how to send using Perl.  You can then create a small script that does 
whatever you want from the command line.</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV align=left><FONT face=Arial size=2><STRONG>R. Joe 
Schirmer</STRONG></FONT></DIV>
<DIV align=left><FONT face=Arial size=1>Software Engineering Lead</FONT></DIV>
<DIV align=left><FONT face=Arial size=1>Crane Aerospace and 
Electronics</FONT></DIV>
<DIV align=left><FONT face=Arial size=1>Signal Technology, Wireless Monitoring 
Solutions (WMS)</FONT></DIV>
<DIV align=left><FONT face=Arial size=1>972-964-5178 x129</FONT></DIV>
<DIV> </DIV><BR>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> rhn-users-bounces@redhat.com 
  [mailto:rhn-users-bounces@redhat.com] <B>On Behalf Of </B>Schirmer 
  Joe<BR><B>Sent:</B> Wednesday, March 29, 2006 5:22 PM<BR><B>To:</B> Red Hat 
  Network Users List<BR><B>Subject:</B> RE: [rhn-users] What is the simplest way 
  to use command line (mailorsendmail) with an attachment?<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV dir=ltr align=left><SPAN class=936271823-29032006><FONT face=Arial 
  color=#0000ff size=2>Try using Perl's Mail::sendmail 
  package.</FONT></SPAN></DIV>
  <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
  <DIV><SPAN class=936271823-29032006><FONT face=Arial color=#0000ff 
  size=2>Here's a sample of how easy it is:</FONT></SPAN></DIV>
  <DIV><SPAN class=936271823-29032006><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN> </DIV>
  <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
  <DIV><FONT face=Courier color=#0000ff size=2><SPAN class=936271823-29032006>#! 
  /usr/local/bin/perl</SPAN></FONT></DIV>
  <DIV><FONT face=Courier color=#0000ff size=2>use Mail::Sendmail;</FONT></DIV>
  <DIV><FONT color=#0000ff><FONT size=2><FONT face=Courier>%mail = ( 
  To      => <SPAN class=936271823-29032006><A 
  href="mailto:'you@there.com'">'</SPAN></FONT></FONT></FONT><FONT size=2><FONT 
  face=Courier>you@there.com<SPAN 
  class=936271823-29032006>'</A></SPAN></FONT></FONT><FONT face=Courier><FONT 
  color=#0000ff><FONT 
  size=2>,<BR>          
  From    => <SPAN class=936271823-29032006><A 
  href="mailto:'me@here.com'">'</SPAN></FONT></FONT><FONT 
  size=2>me@here.com<SPAN 
  class=936271823-29032006>'</A></SPAN></FONT></FONT><FONT face=Courier 
  color=#0000ff 
  size=2>,<BR>          Message 
  => "This is a very short 
  message"<BR>         );</FONT></DIV>
  <DIV><FONT face=Courier color=#0000ff size=2>sendmail(%mail) or die 
  $Mail::Sendmail::error;</FONT></DIV>
  <DIV><FONT face=Courier color=#0000ff size=2>print "OK. Log says:\n", 
  $Mail::Sendmail::log;<BR></FONT></DIV>
  <DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
  <DIV align=left><FONT face=Arial size=2><STRONG>R. Joe 
  Schirmer</STRONG></FONT></DIV>
  <DIV align=left><FONT face=Arial size=1>Software Engineering Lead</FONT></DIV>
  <DIV align=left><FONT face=Arial size=1>Crane Aerospace and 
  Electronics</FONT></DIV>
  <DIV align=left><FONT face=Arial size=1>Signal Technology, Wireless Monitoring 
  Solutions (WMS)</FONT></DIV>
  <DIV align=left><FONT face=Arial size=1>972-964-5178 x129</FONT></DIV>
  <DIV> </DIV><BR>
  <BLOCKQUOTE dir=ltr 
  style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
    <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
    <HR tabIndex=-1>
    <FONT face=Tahoma size=2><B>From:</B> rhn-users-bounces@redhat.com 
    [mailto:rhn-users-bounces@redhat.com] <B>On Behalf Of </B>Bill 
    Watson<BR><B>Sent:</B> Wednesday, March 29, 2006 5:07 PM<BR><B>To:</B> 'Red 
    Hat Network Users List'<BR><B>Subject:</B> [rhn-users] What is the simplest 
    way to use command line (mail orsendmail) with an 
    attachment?<BR></FONT><BR></DIV>
    <DIV></DIV>
    <DIV><SPAN class=984525922-29032006><FONT face=Tahoma color=#0000ff size=4>I 
    have read the sendmail documents that I could find and can only conclude 
    that I am clueless or that attachments on emails are beyond 
    diffilcult.</FONT></SPAN></DIV>
    <DIV><SPAN class=984525922-29032006><FONT face=Tahoma color=#0000ff 
    size=4></FONT></SPAN> </DIV>
    <DIV><SPAN class=984525922-29032006><FONT face=Tahoma color=#0000ff 
    size=4>Is there a tool laying around that can properly package an email 
    attachment onto an email and send it via a command line 
    protocol?</FONT></SPAN></DIV>
    <DIV><SPAN class=984525922-29032006><FONT face=Tahoma color=#0000ff 
    size=4></FONT></SPAN> </DIV>
    <DIV><SPAN class=984525922-29032006><FONT face=Tahoma color=#0000ff 
    size=4>Thanks in advance!</FONT></SPAN></DIV>
    <DIV><SPAN class=984525922-29032006><FONT face=Tahoma color=#0000ff 
    size=4>Bill Watson</FONT></SPAN></DIV>
    <DIV><SPAN class=984525922-29032006><FONT face=Tahoma color=#0000ff 
    size=4><A 
    href="mailto:bill@magicdigits.com">bill@magicdigits.com</A></FONT></SPAN></DIV>
    <DIV><SPAN class=984525922-29032006><FONT face=Tahoma color=#0000ff 
    size=4></FONT></SPAN> </DIV></BLOCKQUOTE>
  <HR>
  <STRONG><FONT color=#ff0000>Attention: </FONT></STRONG><BR>The 
  information contained in this email message may be privileged and is 
  confidential information intended only for the use of the recipient, or any 
  employee or agent responsible to deliver it to the intended recipient. Any 
  unauthorized use, distribution or copying of this information is strictly 
  prohibited and may be unlawful. If you have received this communication in 
  error, please notify the sender immediately and destroy the original message 
  and all attachments from your electronic files.<BR>
  <P>This e-mail message has been scanned and cleared by <STRONG><FONT 
  color=#ff8000>MailMarshal</FONT> </STRONG>
  <HR>

  <P></P></BLOCKQUOTE>
<HR>
<STRONG><FONT color=#ff0000>Attention: </FONT></STRONG><BR> The information 
contained in this email message may be privileged and is confidential 
information intended only for the use of the recipient, or any employee or agent 
responsible to deliver it to the intended recipient. Any unauthorized use, 
distribution or copying of this information is strictly prohibited and may be 
unlawful. If you have received this communication in error, please notify the 
sender immediately and destroy the original message and all attachments from 
your electronic files.<BR>
<P>This e-mail message has been scanned and cleared by <STRONG><FONT 
color=#ff8000>MailMarshal</FONT> </STRONG>
<HR>

<P></P>
</BODY></HTML>