.






Delphi 2.0 Example



Here's actual working code from Delphi 2.0 that sends mail through VIM/MAPI/VINES/MHS:

Type Section

 
    public 
      idsMail: Variant; 


In a Procedure

idsMail := CreateOLEObject('IDSMailInterface.Server'); 
idsMail.ObjectKey := 'ABC123'; 
idsMail.AddRecipientTo ('Jim Smith'); 
idsMail.AddRecipientCc ('Mary Brown, Doug Williams'); 
idsMail.Subject := 'Meeting Agenda'; 
idsMail.AddAttachment ('C:\MEETINGS\AGENDA.DOC'); 
idsMail.Message := 'Here is the agenda for this weeks meeting.'; 
idsMail.Send; 


Note that we didn't need to specify the type of E-mail system we wished to use. IDSMail automatically determined the type of E-mail present on the workstation, and sent the message accordingly.

Here is a similar example for SMTP (Internet mail):

idsMail := CreateOLEObject('IDSMailInterface.Server'); 
idsMail.ObjectKey := 'ABC123'; 
idsMail.MailSystem := IDSM_SYS_SMTP_POP; 
idsMail.PostOffice := 'myprovider.com'; 
idsMail.AddRecipientTo ('Jim Smith '); 
idsMail.AddRecipientCc ('Mary Brown , dougw@acme.com'); 
idsMail.Subject := 'Meeting Agenda'; 
idsMail.AddAttachment ('C:\MEETINGS\AGENDA.DOC'); 
idsMail.Message := 'Here is the agenda for this weeks meeting.'; 
idsMail.Send; 


If you wish, download our Programming Guide (140k)




© 1993-2004, AssurX, Inc. All Rights Reserved. Trademarks. 408-778-1376 | email: info@intuitive-data.com