feature_idispatch can be used to determine if the current platform supports accessing COM objects using the IDISPATCH interface.
program SendEmailWithCDONTS(output);
begin
obj : object;
begin
if supported(feature_idispatch) then
begin
obj := createobject('CDONTS.NewMail');
obj.send('from address', 'to address', 'subject', 'body', 1);
dispose(obj);
end
else
writeln('Can not send email')
end.
Operating Systems: All
Standard Pascal: No