In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about how to send email using matlab. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The sendmail function in matlab can help us achieve this function.
Usage:
Sendmail (recipient mailbox, title)
Sendmail (recipient's mailbox, title, information)
Sendmail (recipient's mailbox, title, message, attachment name)
Note:
1. For a single recipient, specify the recipient as a character vector or string. For multiple recipients, specify the recipient as a character vector cell array or a string array. The title must be a character vector or string.
two。 If the information is a character vector or string, sendmail automatically wraps the text at 75 characters. To force line wrapping in the message text, use 10, as shown in the example. If the information is a character vector cell array or a string array, each element represents a new line of text.
3. The attachment name can be a character vector, a character vector cell array, or a string array.
In general, it is not possible to use sendmail directly, because the sendmail function does not support e-mail servers that require authentication. So you also need to do the following operation
1. You need to enable the smtp service of your mailbox first. Take QQ Mail as an example
Open the account under QQ Mail's settings
And then turn down and find this.
Open the red box, click Open and do what it says. Finally, you will get an authorization code, remember this authorization code, and then the first step will be completed.
two。 Use the setpref function to specify these settings
Setpref ('Internet','E_mail',My_Mail)
% My_Mail is your own email address
Setpref ('Internet','SMTP_Server','smtp.qq.com')
If it is 163mailbox, then the last string is smpt.163.com
Anyway, the characters after @ and .com in the mailbox are placed in smpy. In between and .com
3. Use the following forms of commands to change your system settings and set presets for SMTP usernames and passwords:
Props = java.lang.System.getProperties
Props.setProperty ('mail.smtp.auth','true')
Setpref ('Internet','SMTP_Username',My_Mail)
% My_Mail is your own email address
Setpref ('Internet','SMTP_Password',My_Password)
% My_Password is your authorization code
Then you can happily use sendmail to send email.
Sendmail ('* @ qq.com', 'title', 'Information', 'PicInformation.xls')
Thank you for reading! This is the end of the article on "how to use matlab to send email". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.