Send email from Matlab!
Before first use, type 'fn_email setserver', you will be prompted for your e-mail address and SMTP server settings.
Then, to send an e-mail from Matlab, just type 'fn_email', you will be prompted for:
* recipients: press Enter after each recipient, press Enter twice to continue; if you want to define a nickname, type the nickname that you want, you will then be prompted for the address to associate with this nickname
* subject
* figures to attach: type the list of figures that you want to attach then press Enter; each figure will be saved as both a jpg and an eps file; you will have to manually edit fn_email.m if you want another format
* m-file or file to attach: press Enter after each file you want to enter, press Enter twice to continue; the function uses 'which' to find the file, therefore you do not need to put the .m extension for m-files, and you can give the name of any file on the path (and not only in the current directory); naturally, you can also enter an absolute path
* text: separate lines of text by pressing Enter; pressing Enter twice will leave a blank line, while pressing Enter three time means you finished to type the tex
* send mail now?: press Enter to send immediately, type 'n' and Enter to not send immediately; in such case, the function returns a cell array that you can edit and later send with Matlab function sendmail the following way:
C = ans; % this puts the email content in variable C
% you can do some changes to C
sendmail(C{:}) % send the email
Cita come
Thomas Deneux (2024). Send email from Matlab! (https://www.mathworks.com/matlabcentral/fileexchange/37013-send-email-from-matlab), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- MATLAB > Data Import and Analysis > Data Import and Export > Web Access and Streaming > Web Services >
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.