
Send mail to MS Mail instead of Outlook
Ramir,
SendObject always uses whatever simple MAPI client you have installed on
your machine. To use a different client, install the client and
activate its simple MAPI interface.
A downside of using SendObject and MAPI is that messages will always be
put in the outbox of the program and will not actually be sent. You
will need to manually trigger them to be sent out, or use a more
advanced programming interface such as Active Messaging.
Another alternative is to use SMTP if you are sending mail over the
internet. Our IDSMail component will let you do that quite easily. For
example, this VBA code will send an internet mail message with a file
attachment:
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.Subject = "Meeting Agenda"
idsMail.Message = "Here is the agenda for the weekly meeting."
idsMail.AddAttachment "C:\MEETINGS\AGENDA.DOC"
idsMail.Send
The mail will be sent immeditately to the internet mail server.
Even if you are using a MAPI-based system, this IDSMail code will send
your message immediately via MAPI:
Dim idsMail as Object
Set idsMail = CreateObject("IDSMailInterface.Server")
idsMail.ObjectKey = "ABC123"
idsMail.NewMessage
idsMail.AddRecipientTo "Jim Smith"
idsMail.AddRecipientCc "Mary Brown, Doug Williams"
idsMail.Subject = "Meeting Agenda"
idsMail.Message = "Here is the agenda for the weekly meeting."
idsMail.AddAttachment "C:\MEETINGS\AGENDA.DOC"
idsMail.Send
' Force mail to be flushed from outbox
idsMail.Logout
idsMail.ForceDownload = True
idsMail.Login
For more info on IDSMail, go to http://www.intuitive-data.com
--
Regards,
Eric June
Intuitive Data Solutions
--------- We Make OLE Servers Intuitive --------------
Intuitive Data Solutions fax: (408) 776-1267
Send/Rcv Email *EASILY* through SMTP/POP, VIM, MAPI,
MHS & VINES http://www.intuitive-data.com/idsmail.htm
------------------------------------------------------