IDSMail component sample code

The IDSMail component will let you send out a message with a file attachment from MS Access with just this code:

Dim idsMail as Object
Set idsMail = CreateObject("IDSMailInterface.Server")
idsMail.ObjectKey = "ABC123"
idsMail.MailSystem =IDSM_SYS_SMTP_POP
idsMail.SMTPServer = ""
idsMail.From = "MyName <>"
idsMail.AddRecipientTo "Jim Smith <>"
idsMail.AddRecipientCc "Mary Brown <>"
idsMail.Subject = "Meeting Agenda"
idsMail.Message = "Here is the agenda for the weekly meeting."
idsMail.AddAttachment "C:\MEETINGS\AGENDA.DOC"

[ EmailAccess | Main ]