Re: output from script into email

  • From: Niall Litchfield <niall.litchfield@xxxxxxxxx>
  • To: Tim Gorman <tim@xxxxxxxxx>
  • Date: Sun, 2 Aug 2015 17:05:48 +0100

If the mail program really is mailx then I'd just use

mailx -s sp_used.txt -a sp_used.txt my@xxxxxxxxxxxxxxxx

for that.

On Fri, Jul 31, 2015 at 8:26 PM, Tim Gorman <tim@xxxxxxxxx> wrote:

Brian,

I use something like...

$ uuencode sp_used.txt sp_used.txt | mailx -s sp_used.txt
my@xxxxxxxxxxxxxxxx << __EOF__
Please review the information the attached text file.
__EOF__


This results in an email with the file as an attachment, body of the text
"*Please
review the information the attached text file.*" and subject line of
"sp_used.txt".

Hope this helps...

Thanks!

-Tim



On 7/31/15 12:50, Zelli, Brian wrote:

I am sending myself a space report and it isn’t formatting very well. I
use:



mail -t "Mail Subject" myemailaddress < sp_used.txt



The sp_used.txt is the output of a script I run. How do I format it
better. I saw uuencode but can’t seem to use it correctly in my mail
statement.



Brian



This email message may contain legally privileged and/or confidential
information. If you are not the intended recipient(s), or the employee or
agent responsible for the delivery of this message to the intended
recipient(s), you are hereby notified that any disclosure, copying,
distribution, or use of this email message is prohibited. If you have
received this message in error, please notify the sender immediately by
e-mail and delete this email message from your computer. Thank you.





--
Niall Litchfield
Oracle DBA
http://www.orawin.info

Other related posts: