musicloverlch presented the following explanation :
> ---
> This email has been checked for viruses by AVG.
>
https://www.avg.com
I do not know how to answer your question directly, as I have never
used the Outlook Client to send email from my Access apps. I have used
and am currently still using CDO to send emails. This has proved to be
a simple robust way to send millions (yes I literally mean millions of
emails over the last decade or two) of emails with a minimum of fuss
and muss.
Here is the code that I wrote in the early 2000's which is the core of
the code that i still use.
Public Sub testCDO()
' Purpose Demondtrate Sending an Email with an attachment using CDO
(Collaboration Data Objects)
' Uses Late Binding - Does not need a reference to the
Microsoft CDO For Windows library
' cdosys comes installed as standard on Windows 2K and higher
workstations and servers
' This code will fail on NT4, Win 98, and Win 95 where the
cdosys.dll is not present
' Author Ron Weiner rwe...@WorksRite.com
' Copyright © 2001-2005 WorksRite Software Solutions
' You may use this code example for any purpose what-so-ever
with
' acknowledgement. However, you may not publish the code
without
' the express, written permission of the author.
Const cdoSendUsingPort = 2
Const cdoBasic = 1
Dim objCDOConfig As Object, objCDOMessage As Object
Dim strSch As String
strSch = "
http://schemas.microsoft.com/cdo/configuration/"
Set objCDOConfig = CreateObject("CDO.Configuration")
With objCDOConfig.Fields
.Item(strSch & "sendusing") = cdoSendUsingPort
.Item(strSch & "smtpserver") = "
SMTP.ServerName.Com"
' Only used if SMTP server requires Authentication
.Item(strSch & "smtpauthenticate") = cdoBasic
.Item(strSch & "sendusername") = "SomeM...@SomeDomain.com"
.Item(strSch & "sendpassword") = "YourPassword"
.Update
End With
Set objCDOMessage = CreateObject("CDO.Message")
With objCDOMessage
Set .Configuration = objCDOConfig
.from = "Senders Pretty Name"
.sender = "SomeM...@SomeDomain.com"
.To = "Som...@SomeWhere.com"
.Subject = "Sample CDO Message"
' Use TextBody to send Email in Plain Text Format
'.TextBody = "This is a test for CDO message"
' Use HTMLBody to send Email in Rich Text (HTML) Format
.HTMLBody = "Test CDO Rich Text this is not Bold But <B>This
is!</B>"
' Adding Attachments is easy enough
.AddAttachment "c:\SomeFile.zip"
.AddAttachment "c:\SomeOtherFile.pdf"
' Un-Rem next line to get "Return Reciept Request"
'.MDNRequested = True
.Send
End With
Set objCDOMessage = Nothing
Set objCDOConfig = Nothing
End Sub
Perhaps you will find it useful. If nothing else it will remove the
reliance on Outlook to get your emails sent.
Good luck with your project.
Rdub