Hi Mark,

The 'mail' command is just a dummy wrapper to /dev/null, not functional.

The command 'sendmail' is what you want to use.

Starting in 0.7.4, we added a new command 'mime-pack' that creates a mime 
encoded email, ie.

$ mime-pack 
Usage: mime-pack msg_body file_name1 mime_type1 [ file_name2 mime_type2 ... ]
Example: mime-pack "Message body\nline2" "file.pdf" "application/pdf"

The structure is:  echo "header lines..." | mime-pack ... | sendmail -t

So, to create a mime encoded email containing an attachment, start by 
specifying the Subject: and To: header lines, then pipe that to mime-pack to 
add the attachment, finally pipe that to sendmail -t .  For example, 
interactively using the shell...
--
$ echo "Subject: CDR_records
> To: [email protected]" | \
> mime-pack "CDR's\nEnjoy..." "/mnt/kd/cdr-csv/Master.csv" "text/plain" | \
> sendmail -t
--

Lonnie

PS: we should add a tip in the docs for this.


On Dec 21, 2010, at 4:09 PM, Mark Phillips wrote:

> Hi folks,
> 
> I have a need to email certain log files and CDR records etc out of the 
> AstLinux box.
> 
> I've been using this command ....
> 
> mail -s "CDR_records" -a /mnt/kd/cdr-csv/Master.csv [email protected]
> 
> Which appears to complete but the mail and attachment never arrive.
> 
> Voicemail files from the same system _are_ getting to my email.
> 
> /var/log/messages shows nothing.
> 
> Ideas?
> 
> Thanks
> 
> -- 
> 
> 
> /\/\ark Phillips
> 
> ------------------------------------------------------------------------------
> Forrester recently released a report on the Return on Investment (ROI) of
> Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
> within 7 months.  Over 3 million businesses have gone Google with Google Apps:
> an online email calendar, and document program that's accessible from your 
> browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
> _______________________________________________
> Astlinux-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/astlinux-users
> 
> Donations to support AstLinux are graciously accepted via PayPal to 
> [email protected].
> 
> 


------------------------------------------------------------------------------
Forrester recently released a report on the Return on Investment (ROI) of
Google Apps. They found a 300% ROI, 38%-56% cost savings, and break-even
within 7 months.  Over 3 million businesses have gone Google with Google Apps:
an online email calendar, and document program that's accessible from your 
browser. Read the Forrester report: http://p.sf.net/sfu/googleapps-sfnew
_______________________________________________
Astlinux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to 
[email protected].

Reply via email to