MATLAB Function Reference    

Send e-mail message (attachments optional) to list of addresses



sendmail('recipients','subject','message','attachments') sends message to recipients with the specified subject. For recipients, use a string for a single address, or a cell array of strings for multiple addresses. Optionally specify attachments as a cell array of files to send along with message.

If MATLAB cannot read the SMTP mail server from your system registry, you get an error. You need to identify the outgoing SMTP mail server for your electronic mail application, which is usually listed in preferences. Or, consult your e-mail system administrator. Then provide the information to MATLAB using


Sample message:

  send (COM) serial