[rhn-users] What is the simplest way to use command line (mail orsendmail) with an attachment?

Schirmer Joe joe.schirmer at craneae.com
Wed Mar 29 23:22:19 UTC 2006


Try using Perl's Mail::sendmail package.
 
Here's a sample of how easy it is:
 
 
#! /usr/local/bin/perl
use Mail::Sendmail;
%mail = ( To      => ' <mailto:'you at there.com'> you at there.com',
          From    => ' <mailto:'me at here.com'> me at here.com',
          Message => "This is a very short message"
         );
sendmail(%mail) or die $Mail::Sendmail::error;
print "OK. Log says:\n", $Mail::Sendmail::log;

 
R. Joe Schirmer
Software Engineering Lead
Crane Aerospace and Electronics
Signal Technology, Wireless Monitoring Solutions (WMS)
972-964-5178 x129
 


________________________________

	From: rhn-users-bounces at redhat.com
[mailto:rhn-users-bounces at redhat.com] On Behalf Of Bill Watson
	Sent: Wednesday, March 29, 2006 5:07 PM
	To: 'Red Hat Network Users List'
	Subject: [rhn-users] What is the simplest way to use command
line (mail orsendmail) with an attachment?
	
	
	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.
	 
	Is there a tool laying around that can properly package an email
attachment onto an email and send it via a command line protocol?
	 
	Thanks in advance!
	Bill Watson
	bill at magicdigits.com
	 


######################################################################
Attention: 
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.


This email was scanned and cleared by MailMarshal.
######################################################################
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/rhn-users/attachments/20060329/d21a7351/attachment.htm>


More information about the rhn-users mailing list