[AccessD] Automating email

Michael Maddison michael at ddisolutions.com.au
Tue Feb 20 19:00:04 CST 2007


I think there are different versions where some only work on the
Exchange server.

We are starting to use WebDav in a C# project, I seem to recall seeing
VB6 sample code
on MSDN.  The advantage of WebDav is that no CDO or other libraries are
required except
for MSXML(?) which is a standard Windows dll.

cheers

Michael M

Subject: Re: [AccessD] Automating email

Nope the CDO client dll stuff comes with Win2000 and WinXP I think if at
least Outlook express is installed.
Should work with CDOSys.dll  Windows Collaboration Objects CDONTS,
CDOSYS, and CDOEX use Outlook Express DLLs See
http://www.cdolive.com/cdo8.htm

Erwin Craps - IT Helps wrote:

>Euh, Maybe I'm wrong with this but isn't CDO only available on a server

>running Exchange Server?
>
>-----Oorspronkelijk bericht-----
>Van: accessd-bounces at databaseadvisors.com
>[mailto:accessd-bounces at databaseadvisors.com] Namens David Emerson
>Verzonden: dinsdag 20 februari 2007 19:38
>Aan: Access Developers discussion and problem solving
>Onderwerp: Re: [AccessD] Automating email
>
>Thanks Kath and Erwin,
>
>I eventually found some code that doesn't rely on outlook but uses 
>another file called CDOEx.dll.  It doesn't leave any items in outlook.
>
>In references you need to set the reference to Microsoft CDO for 
>Exchange 2000 Library
>
>Public Function SendCdoMsg()
>
>     On Error GoTo Err_SendCdoMsg
>
>     Dim msg As Message
>
>     Set msg = CreateObject("CDO.Message")
>
>     With msg
>         With .Configuration.Fields
>             .Item(cdoSMTPAuthenticate) = cdoAnonymous
>             .Item(cdoSendUsingMethod) = cdoSendUsingPort
>             .Item(cdoSMTPServer) = "smtp.xtra.co.nz"
>             .Item(cdoSMTPConnectionTimeout) = 10
>             .Item(cdoSMTPServerPort) = 25
>             .Update
>         End With
>         .Organization = "my"
>         .To = "you at yourprovider"
>         .Subject = "Example subject"
>         .TextBody = "Example body"
>         .From = "me at myprovider"
>         .AddAttachment ("d:\aaaatemp\accarch135.zip")
>         .Send
>     End With
>
>     Set msg = Nothing
>
>Exit_SendCdoMsg:
>     Exit Function
>
>Err_SendCdoMsg:
>     Select Case Err
>         Case 0
>             MsgBox "0 error", vbCritical, "Error heading"
>         Case Else
>             Call basErrorMsg("SendCdoMsg")
>     End Select
>     Resume Exit_SendCdoMsg
>
>End Function
>
>
>At 20/02/2007, you wrote:
>  
>
>>Hi David - I only use the .Display option in my apps so that the users

>>can add some text to the email if they want to before it is sent, but 
>>.send WILL send the email depending on their Outlook preferences.
>>
>>ie. if they have [tools] [options] [mail delivery] 'Send immediately 
>>when connected' turned on, then yes, it will send.
>>
>>I haven;t found any way of that email not going into sent items
though.
>>
>>Kath
>>
>>  ----- Original Message -----
>>  From: David Emerson
>>  To: accessd at databaseadvisors.com
>>  Sent: Tuesday, February 20, 2007 11:31 AM
>>  Subject: [AccessD] Automating email
>>
>>
>>  Group,
>>
>>  I have the following code to create an email message:
>>
>>  Public Function basSendEmail()
>>
>>       Dim outApp As Outlook.Application, outMsg As MailItem
>>
>>       Set outApp = CreateObject("Outlook.Application")
>>       Set outMsg = outApp.CreateItem(olMailItem)
>>
>>       With outMsg
>>           .To = "newsgrps at dalyn.co.nz"
>>           .Subject = "Test egas email"
>>           .Body = "Test message"
>>           .Send
>>       End With
>>
>>       Set outApp = Nothing
>>       Set outMsg = Nothing
>>
>>  End Function
>>
>>  This works fine but only puts the message into my Outlook outbox -
>>    
>>
>it
>  
>
>>  doesn't send it.  This may be because although I have outlook  
>> installed I do not use it (and it has not been set up).
>>
>>  However, my clients use outlook.  Will the above code automatically

>> send out emails?
>>
>>  Another question - My client would prefer not to have copies in
>>    
>>
>their
>  
>
>>  outbox of the email being sent out (ultimately it will be to email  
>> out accounts and they don't want thousands of emails generated each  
>> month).  Is there a way for the messages not to appear in outlook?
>>
>>
>>  --
>>  AccessD mailing list
>>  AccessD at databaseadvisors.com
>>  http://databaseadvisors.com/mailman/listinfo/accessd
>>  Website: http://www.databaseadvisors.com
>>--
>>AccessD mailing list
>>AccessD at databaseadvisors.com
>>http://databaseadvisors.com/mailman/listinfo/accessd
>>Website: http://www.databaseadvisors.com
>>    
>>
>
>--
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com
>  
>

--
Marty Connelly
Victoria, B.C.
Canada

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list