Auswertung Experiment
Database tüddelei DBHanlder läuft gut für DIESE Datanbank struktur... App begonnen aber weit entfernt von gutem Stand
This commit is contained in:
20
Libs/sendolmail.m
Normal file
20
Libs/sendolmail.m
Normal file
@@ -0,0 +1,20 @@
|
||||
function sendolmail(to,subject,body,attachments)
|
||||
%Sends email using MS Outlook. The format of the function is
|
||||
%Similar to the SENDMAIL command.
|
||||
% Create object and set parameters.
|
||||
h = actxserver('outlook.Application');
|
||||
mail = h.CreateItem('olMail');
|
||||
mail.Subject = subject;
|
||||
mail.To = to;
|
||||
mail.BodyFormat = 'olFormatHTML';
|
||||
mail.HTMLBody = body;
|
||||
% Add attachments, if specified.
|
||||
if nargin == 4
|
||||
for i = 1:length(attachments)
|
||||
mail.attachments.Add(attachments{i});
|
||||
end
|
||||
end
|
||||
% Send message and release object.
|
||||
mail.Send;
|
||||
h.release;
|
||||
end
|
||||
Reference in New Issue
Block a user