.






Visual Basic v3.0 Example



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

 
Dim idsMail as Object 
Set idsMail = CreateObject("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 the weekly 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):

 
Dim idsMail as Object 
Set idsMail = CreateObject("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 the weekly 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