Sending an e-mail through MATLAB using Microsoft Outlook

5 views (last 30 days)
So, I am using the function 'sendolmail' found at the following Mathworks blog to send e-mails from my Outlook account from the MATLAB editor. It indeed works, and I can also include attachments or pictures etc. My question is whether it is possible to send a result of another MATLAB function saved and run at the same directory. I tried calling the function like that :
sendolmail('email_address','Subject included',result of a function);
When I run this, a mistake is returned. It seems as if only strings or attachments from my computer can be sent through the function. Any ideas on how results of functions can be added and sent? Thanks in advance!

Answers (1)

ES
ES on 12 Jul 2017
If the "result of a function" is a number, you should convert it to a string and pass it (using num2str function)
  2 Comments
ZACHARIAS KOUNTOUPIS
ZACHARIAS KOUNTOUPIS on 12 Jul 2017
Hi and thanks for your answer.
The result is a simple text,i.e string, as the function is a test-bench returning a specific output, based on the input. Though when I put the result of the function, the called 'sendolmail' function won't compile correctly.
ZACHARIAS KOUNTOUPIS
ZACHARIAS KOUNTOUPIS on 12 Jul 2017
Never mind, I was using the variable at which the string was attached, though I had to call the whole function. So it is solved. Thanks again.

Sign in to comment.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!