J
Jeff Thies
Common problem. Data that is tabular in nature and needs to be sent via
email. Typically that is an order.
That leaves several alternatives.
1) Just send it as HTML and forget plain text or multipart.
2) Custom convert this, which I am so tired of doing.
3) Pad each cells data to a fixed length and display that as a "table".
Trouble if data is longer than the fixed length as that should wrap to
the next line
4) Something like this
$row=~s/.*?<td>(.*?)</td>.*?<td>(.*?)</td>.*/$1:\n$2\n\n/g;
which would give results like this:
first cell:
second cell
first cell second row:
second cell second row
That's problematic for mutiple cell rows, but could probably be hacked out.
This is a common thing to do. There must be some other way of converting
html tables to plain text or perhaps it's not worth the trouble of
sending a complete multipart message. HTML email is terribly common.
Jeff
email. Typically that is an order.
That leaves several alternatives.
1) Just send it as HTML and forget plain text or multipart.
2) Custom convert this, which I am so tired of doing.
3) Pad each cells data to a fixed length and display that as a "table".
Trouble if data is longer than the fixed length as that should wrap to
the next line
4) Something like this
$row=~s/.*?<td>(.*?)</td>.*?<td>(.*?)</td>.*/$1:\n$2\n\n/g;
which would give results like this:
first cell:
second cell
first cell second row:
second cell second row
That's problematic for mutiple cell rows, but could probably be hacked out.
This is a common thing to do. There must be some other way of converting
html tables to plain text or perhaps it's not worth the trouble of
sending a complete multipart message. HTML email is terribly common.
Jeff