sending content of variable via email

10 views (last 30 days)
I want to send via gmail the variable not as attachment but display its content which is a row of numbers. How can I do that?
  1 Comment
bashar halleem
bashar halleem on 20 May 2020
Hi Geoff. I has a question about matrices, if you have a time to take a look pls.

Sign in to comment.

Accepted Answer

Geoff Hayes
Geoff Hayes on 4 Jan 2015
AA - try using sendmail. See the gmail example at this link. If you want your message to be a row of numbers, then try something like
A = [1 2 3 4 5];
% convert the row of numbers to a string (message)
msg = num2str(A);
% send the email
sendmail('some_address@gmail.com', 'My Subjsect', msg);
The above assumes that you have set the properties appropriately for sending email using a gmail account. (Again see the link for details.)

More Answers (0)

Community Treasure Hunt

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

Start Hunting!