How to use code to send mail using matlab
How to use code to use matlab to send e-mail, I believe that many inexperienced people do not know what to do, so this article summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
Text:
1. Show the results first.
Try it first.
I used matlab to send the mail to my 163mailbox.
Yeah, it's cool.
Haha, it has been checked and received, the e-mail is coming.
Think about it carefully, this game is of great practical value. I'll talk about it later.
two。 Implementation methods and steps
-2.1 ideas and steps?
-2.2 Code and explanation
% * *% Filename: demo_sendEmail.m% Author: Mario likes prawns% Description: use matlab to send email% step1: fill in the sender's email account number and password% Step2: fill in the recipient's mailbox account number and password% step3: mailbox setting% step4: send email% Revision: 2021 props 01and10% * props = java.lang.System.getProperties Props.setProperty ('mail.smtp.auth','true');% step1: fill in the sender's email account number and password% (! Modify it yourself, the mailbox number and password below are just examples) senderMailAccount='13155556666@163.com';senderMailKey='wodemima666';%step2: fill in the recipient email account% (! Modify it yourself, the following mailbox number is just an example) receiverMailAccount='1506668888@163.com';%step3: mailbox settings setpref ('Internet','SMTP_Server','smtp.163.com'); setpref (' Internet','E_mail',senderMailAccount); setpref ('Internet','SMTP_Username',senderMailAccount); setpref (' Internet','SMTP_Password',senderMailKey);% step4: send email% message subject and content subject='demo Test-send email using matlab' TheMessage= "Thank you for subscribing to my CSDN column to explore the interesting and new ways of playing MATLAB." ; sendmail (receiverMailAccount,subject,theMessage); disp ("sent successfully ~"). After reading the above, have you mastered how to use matlab to send e-mail in code? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!