**** Send a mailing using MS ACCESS 95 with or without MS EXCHANGE SERVER ***** 
Author Message
 **** Send a mailing using MS ACCESS 95 with or without MS EXCHANGE SERVER *****

I have an Access database filled with al my clients. The database also
includes their e-mail addresses. Now I want to send a mailing using this
database.

I have already written the code to send this mailing to every client. I do
this using the SendObject-action. Every client now gets a personalised
e-mail without all the other e-mail addresses in the TO-field.

    Here comes the problem:  I want the message to contain an attachment.

I want to send a file (which is not inside my database) with this mailing.

    HOW DO I DO THIS??????

I also have MS Exchange Server. Maybe there is an option where I can send a
default message, which contains my attachment.

If anyone can help me I would be very grateful.

Thanks.

Greetz,

Marco Langebeeke.



Fri, 12 May 2000 03:00:00 GMT  
 **** Send a mailing using MS ACCESS 95 with or without MS EXCHANGE SERVER *****

Marco,

The built-in SendObject function will not work in your case because you
want to send a generic file attachment.  SendObject only works for
Access objects.

You can solve your problem easily with our IDSMail component.  It
provides MS  Access a universal E-mail send/receive interface that
supports any mail systems  based on MAPI, SMTP/POP3 (Internet mail),
MHS, VIM, or Banyan VINES.

For example, here is all the code you need to 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

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
------------------------------------------------------



Fri, 12 May 2000 03:00:00 GMT  
 **** Send a mailing using MS ACCESS 95 with or without MS EXCHANGE SERVER *****

Marco,

The send object action can not do attachments. One possibility is to write
code using the MAPI control (there are lots of code examples on the MS
site). I've done this within a VB application that queries a database of
subscribers for a weekly news letter (to basically get over the 'TO'
problem, and also mail subscribers through saved queries.

Zeid


Quote:
> I have an Access database filled with al my clients. The database also
> includes their e-mail addresses. Now I want to send a mailing using this
> database.

> I have already written the code to send this mailing to every client. I
do
> this using the SendObject-action. Every client now gets a personalised
> e-mail without all the other e-mail addresses in the TO-field.

>     Here comes the problem:  I want the message to contain an attachment.

> I want to send a file (which is not inside my database) with this
mailing.

>     HOW DO I DO THIS??????

> I also have MS Exchange Server. Maybe there is an option where I can send
a
> default message, which contains my attachment.

> If anyone can help me I would be very grateful.

> Thanks.

> Greetz,

> Marco Langebeeke.



Sat, 13 May 2000 03:00:00 GMT  
 **** Send a mailing using MS ACCESS 95 with or without MS EXCHANGE SERVER *****

Quote:

>I have an Access database filled with al my clients. The database also
>includes their e-mail addresses. Now I want to send a mailing using this
>database.

>I have already written the code to send this mailing to every client. I do
>this using the SendObject-action. Every client now gets a personalised
>e-mail without all the other e-mail addresses in the TO-field.

>    Here comes the problem:  I want the message to contain an attachment.

>I want to send a file (which is not inside my database) with this mailing.

>I also have MS Exchange Server. Maybe there is an option where I can send a
>default message, which contains my attachment.

>If anyone can help me I would be very grateful.

>Marco Langebeeke.

Marco:

As the other commentors have said, SendObject doesn't support attachments.
However, with a little perserverance you can write some pretty simple code
to add attachments to mail using Microsoft's FREE, ActiveMessaging / OLE
Messaging capability for MAPI (Read Exchange, VIM etc.)

Go to this url:

http://www.microsoft.com/syspro/technet/boes/bo/mailexch/exch/tools/a...
actmsg.htm   and download Active Messaging 1.1  it contains a help file
which discusses all the objects for interacting with MAPI.  Install the
ActiveMessaging dlls.

If you have Excel (preferably Excel 5 or 95,) then you can also go to:

ftp://ftp.microsoft.com/developr/MAPI/samples/OLEMSG  and download
olemsg.zip, which contains a ton of VBA code in a couple of Excel modules to
show you how to interact with ActiveMessaging.

Once you get familiar with the MAPI objects, logging on and off etc., here's
a little code snipet which comes from one of our apps showing how to add an
attachment to mail.

'---------------------------------------------------------------------------
----------------------------------------------------------

Public Function SendMail(MailName$, NameResolve As Boolean, MsgSubject$,
MsgText$, AttachmentName$, Attachment$, Optional MailType, Optional
MailAddress) As Boolean
'---------------------------------------------------------------------------
----------------------
'? 1996-97 ATTAC Consulting Group, Ann Arbor, MI USA
'---------------------------------------------------------------------------
----------------------
On Error GoTo Err_SM

    Dim ObjMessageColl As Object
    Dim ObjMessage As Object
    Dim ObjRecipColl As Object
    Dim ObjRecipient As Object
    Dim ObjAttachmentsColl As Object
    Dim ObjAttachment As Object

    SendMail = True

    If ObjSession Is Nothing Then
      'ObjSession is MAPI session object created in a separate LogOn
function
        If Mapi_LogOn("", "") = False Then
            SendMail = False
            GoTo Exit_SM
        End If
    End If

        Set ObjMessageColl = ObjSession.Outbox.Messages
        Set ObjMessage = ObjMessageColl.Add
        ObjMessage.Subject = MsgSubject
        ObjMessage.Text = MsgText

        Set ObjRecipColl = ObjMessage.Recipients
        Set ObjRecipient = ObjRecipColl.Add
        If NameResolve = True Then   'Recipient is in the Address Book
            ObjRecipient.Name = MailName
            ObjRecipient.Resolve
        Else
            ObjRecipient.Name = MailName   'Recipient is not in Address book
e.g. SMTP
            ObjRecipient.Address = MailType & ":" & MailAddress
        End If

        If Len(AttachmentName) > 0 Then
            Set ObjAttachmentsColl = ObjMessage.Attachments
            Set ObjAttachment = ObjAttachmentsColl.Add
            ObjAttachment.Name = AttachmentName
            ObjAttachment.Type = 1 'File Attachment
            ObjAttachment.Position = 0
            ObjAttachment.ReadFromFile (Attachment)
        End If

        ObjMessage.Update
        ObjMessage.Send ShowDialog:=False

Exit_SM:
    Exit Function

Err_SM:
    SendMail = False
    Resume Exit_SM
End Function

HTH
-----------

Steve Arbaugh
ATTAC Consulting Group
web: http://ourworld.compuserve.com/homepages/attac-cg/acgsoft.htm
Reply Address adjusted to control spams remove leading ~ and NoSpm from
address



Sat, 13 May 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Sending mail without using MS Outlook or other mail client

2. Using MS-Exchange as OLE Mail Server

3. Moving Oracle records to MS SQL Server using MS Access

4. interfacing ms vb to ms exchange server

5. Sending Mail without MS-Outlook 2000

6. Sending Mail without MS-Outlook 2000

7. Q:Envoking MS-Word from VB4 when Exchange is using MS-Word

8. Using MS Exchange to fax and E-Mail through from Access97 runtime

9. MS Access to MS Exchange Address Book??

10. Help: Using MS Access 95 w/ VB 5 for Novice VB programmer

11. Help, using an Access 97 DB without MS Access Application

12. Help, using an Access 97 DB without MS Access Application

 

 
Powered by phpBB® Forum Software