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 = "myprovider.com"
idsMail.NewMessage
idsMail.From = "MyName <me@mycompany.com>"
idsMail.AddRecipientTo "Jim Smith <jsmith@example.com>"
idsMail.AddRecipientCc "Mary Brown <mary@example.gov>"
idsMail.Subject = "Meeting Agenda"
idsMail.Message = "Here is the agenda for the weekly meeting."
idsMail.AddAttachment "C:\MEETINGS\AGENDA.DOC"
idsMail.Send

[ EmailAccess | Main ]