Send a table in an email.

Pi Digital sean at
Thu Sep 9 04:35:49 EDT 2021

Hehe. Full of ‘solutions’ :)

It’s because we need to see it as a table in an email :D
That’s the point of the question. 

Here’s my full process if it helps you understand. 

I (that is to say, a server I code and manage) process around 100-120 emails a day from the mobile (cell phone) carriers O2 and EE. They all get done at about 5am every day at including weekends. Some have call data in them and some do not. Some have broken csv’s in them. Myself and others in the team need to quickly know when it breaks so we can look into it. 

So, to be absolutely sure, we email ourselves every morning a list of which emails have been processed for all of the clients (4 so far). It has the details of the email UID, the customer name, the client(or Dealer as we call them) name, the date range, the account number, number of Kb, and a bunch of other relevant data to us. This list has grown. Each line has a of course a different length and does not format out like the table it is put into in LC. 

The purpose of the email is a forceful reminder to us to check. The subject let’s us know immediately if there may be issues by telling us how many got processed and how many had data and how many are potentially broken. These can only be indicators. We find ourselves in the rubbish position of checking it over by eye. 

We ‘could’ have it sent to a database, or show up in an app or all manner of other methods but by far and away the simplest way for us to daily get this reminder is by a simple email with a heading and a list. Email is a system with a long track record of ‘working’. The fact that email still exists is testament to this. A quick scan over this daily doc helps us quickly see which ones we’ve already checked, what potential issues there are and, more importantly for me, if the remote server had completely fallen over. No need to open any links or other software to view quickly a stream of data. It’s easier to recall and delete than our mySQL database. Email is just there, always. 

So, the ability to quickly convert our little table from a text field on the server into the body of an email is what I’m looking to do. I had expected the mime field encoder to do this but it seems it’s only very simple in its view of a field. 

The data returned from ‘the htmlText of field’ is so long and convoluted and also does not contain either the correct formatting or table info suitable for email. 

So, it looks like if I have to do it I will have to code a whole html method for expressing it as a table in an email body that email will accept and display as expected. That’s why I had ‘hoped’ that the MIME encoder already did it for us. Alas, negatory!

I didn’t want to have to have put all this into an email when asking the question and ‘hoped’ that a simple question would suffice to get a simple answer (which MarkW was gracious to provide from the most qualified position I know). 

But, seriously, thank you for your interest and attempts to offer useful suggestions. Sometimes what sounds like a simple answer actually just overcomplicates the ‘end user experience’. Something we as software engineers should be ever aware of ;)

Thanks again

Pi Digital

> On 9 Sep 2021, at 05:29, Rick Harrison via use-livecode <use-livecode at> wrote:
> Hi Sean,
> Why don’t you just email them a spreadsheet or a .csv file,
> let them open it. and they can copy and paste whatever they want
> into their own spreadsheet?
> Rick
>> On Sep 8, 2021, at 10:43 PM, Pi Digital via use-livecode <use-livecode at> wrote:
>> Hi Rick
>> Because, as stated before, you can’t select the text and paste it into a spreadsheet. 
>> Thanks though. 
>> Sean
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list