Send a mail in kdb

I have a table out of q query and need to send the output in a proper html table inside q script.

The table should be in the body of the email and not as an attachment, using sendmail Functionality

 

The table in the email body should like below one.

| A | B | C |
| 4 | 7 | 8 |
| 1 | 2 | 3 |

This is a duplicate / cross-post which has already been answered on StackOverflow