sending a graph via email automatically

when i create a plot, how can i send it automatically via my gmail account? how can i configure this?

回答 (1 件)

per isakson
per isakson 2014 年 12 月 25 日
編集済み: per isakson 2014 年 12 月 25 日

1 投票

Search the FEX for sendmail gmail

4 件のコメント

AA
AA 2014 年 12 月 26 日
I have configured my gmail but how do i attach the figure graph ( which was created by a function)
per isakson
per isakson 2014 年 12 月 27 日
編集済み: per isakson 2014 年 12 月 27 日
Save it to at file and attach the file to the email.
AA
AA 2014 年 12 月 27 日
I am using the code below but the problem is that I do not know how I can attach a graph as a file in this code. DO you have any idea?
UserName = 'yourmail@gmail.com';
passWord = 'password';
setpref('Internet','E_mail',UserName);
setpref('Internet','SMTP_Server','smtp.gmail.com');
setpref('Internet','SMTP_Username',UserName);
setpref('Internet','SMTP_Password',passWord);
props = java.lang.System.getProperties;
props.setProperty('mail.smtp.auth','true');
props.setProperty('mail.smtp.socketFactory.class', ...
'javax.net.ssl.SSLSocketFactory');
props.setProperty('mail.smtp.socketFactory.port','465');
emailto = 'emailWhereToSend'; % recipient's email
sendmail(emailto, 'My Subject', 'My message');
per isakson
per isakson 2014 年 12 月 27 日
編集済み: per isakson 2014 年 12 月 27 日
sendmail( recipients, subject, message, attachments )
attaches the files listed in the string or cell array attachments.
The fourth input argument, attachments, has been available at least a few Matlab releases back. Which release do you use?
AFAIK: With sendmail it is not possible show a picture in the mail itself (embedded in the message).

サインインしてコメントする。

質問済み:

AA
2014 年 12 月 25 日

編集済み:

2014 年 12 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by