Re: output from script into email

From: MARK BRINSMEAD <mark.brinsmead_at_gmail.com>
Date: Fri, 31 Jul 2015 22:56:43 -0400
Message-ID: <CAAaXtLBsUUV+TASFMQeZUnU+KerapqFjOZHfqLCHJ6n4WNHvrw_at_mail.gmail.com>



Many email readers like to treat incoming messages as HTML, and that usually will strip whitespace.

<pre> and </pre> tags around your plain text may sometimes help.

A more correct approach is probably to craft the proper MIME headers to explain to mail readers just what it is that you are sending. The "trick" with uuencoding the text probably also exploits assumptions on the part of your mail reader, that any block of uuencoded data is meant to be an attachment. While this may work for your purposes, you might find that it "works" (or not) quite differently for people using different email infrastructures.

Proper use of MIME headers should work reliably for all. Once you get that down, you can also send nicely HTML-formatted reports if you like.

On Fri, Jul 31, 2015 at 9:00 PM, De DBA <dedba_at_tpg.com.au> wrote:

> Agree completely. In fact, this message is likely already sent in plain
> text. The formatting problem you see would be caused by your email reader
> (outlook?) stripping "extra" spaces etc. You can configure most readers to
> display plain text messages as is. As Seth suggests, make sure that your
> reader is using a monospace font to display plain text messages.
>
> Cheers,
> Tony
>
>
> On 01/08/15 06:26, Seth Miller wrote:
>
> Brian,
>
> Also make sure you are either sending the message in plain text or you are
> using a monospace font like Courier New or Consolas if using Rich Text or
> HTML.
>
> Seth Miller
>
> On Fri, Jul 31, 2015 at 2:26 PM, Steve Bradshaw <sjb1970_at_gmail.com> wrote:
>
>> Uuencode is used for attaching files.
>>
>> If the ouput is from sqlplus its most likely tabs causing the
>> problem-some things treat them as 4 spaces, others 8.
>>
>> There is an option to used spaces rather than tabs but I can't remember
>> off the top of my head.
>> On 31 Jul 2015 19:51, "Zelli, Brian" <Brian.Zelli_at_roswellpark.org> 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.
>>
>>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Sat Aug 01 2015 - 04:56:43 CEST

Original text of this message