MATLAB email body include text and a table
Show older comments
Hello everyone,
I would like to include into an email body apart from text, also a table.
For example:
This is a test email
'Alberta' '2020-07-20 00:00:00.0' '2021-05-03 00:00:00.0' 'no action needed' 'no action needed'
'Aristarchos' '2017-09-14 00:00:00.0' '2020-12-12 00:00:00.0' 'no action needed' 'action needed'
'Balos' '2018-05-22 00:00:00.0' '2020-12-20 00:00:00.0' 'no action needed' 'no action needed'
I tried to modify the sendmail function with below code:
~isempty(charset)
msg.setText(body, charset, 'html');
else
msg.setText(body, '', 'html'); %not sure an empty charset will work
end
but the result was that I couln't add the text only the table but not with the required format but simple single rows as per below:
Alberta
Aristarchos
Balos
2020-07-20 00:00:00.0
2017-09-14 00:00:00.0
2018-05-22 00:00:00.0
2021-05-03 00:00:00.0
2020-12-12 00:00:00.0
2020-12-20 00:00:00.0
no action needed
no action needed
no action needed
no action needed
action needed
no action needed
How can I achieve the required format?
Thank you in advance!!
Accepted Answer
More Answers (0)
Categories
Find more on Web Services in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!