Access 2007 stops working in Vista sending SMTP mails

L

lars

I have problem with the following code sending SMTP mails and using cdoex.dll
with Mail Delivery Notification (MDNRequested = True) in Access 2007 and
Vista. It works fine in Windows XP. It also works in Vista if I set
MDNRequested = False. I have looked on the Internet but not found any reports
on this problem. Does anybody know if this is a bug in Vista?

Dim leMsg As New CDO.Message
Dim lBp As CDO.IBodyPart
Dim leFlds As ADODB.Fields

If GeMailConf Is Nothing Then
Set GeMailConf = New CDO.Configuration

Set leFlds = GeMailConf.Fields

leFlds(cdoSendUsingMethod) = cdoSendUsingPort
leFlds(cdoSMTPServer) = "server2000.domain.com"
leFlds(cdoDispositionNotificationTo) = "(e-mail address removed)"
leFlds.Update
End If

With leMsg
Set .Configuration = GeMailConf
.MimeFormatted = False
.AutoGenerateTextBody = False
.To = "(e-mail address removed)"
.From ="(e-mail address removed)"
.Subject = "Any subject"
.TextBody = "Any text body"

.MDNRequested = True 'PROBLEM: True - Request Read Receipt

.Send 'Access 2007 stops working in Vista after sending the message
'with MDNRequested = True. Works fine in Windows XP.
'Also works in Vista with MDNRequested = False
End With
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top