Avatar of loybob
Flag for United States of America asked on

Access, CDO and Exchange

I'm setting up a button on an Access form in my Access application to send an email.  I have this code working perfectly on my pc, using my Outlook 2007 and pop3 email from Verizon - it attaches the report and sends the email.


 Set objCDO = CreateObject("CDO.Message")

objCDO.From = fromEmail
objCDO.To = DsStatusData![Email]
objCDO.Subject = "Status Report from Smith Consulting"
objCDO.TextBody = "Please see the attached Status Report - It can be opened with Microsoft Word.  Please reply to this email and attach the completed form."
objCDO.AddAttachment ("F:\TABS\Status Reports\StatusReportEmail.rtf")

With objCDO.Configuration
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "email@verizon.net"
.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.verizonemail.net"

.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpusess1") = False
End With


Set objCDO = Nothing


My user is using Exchange 2010, and on her system I'm using:

.Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "email@smithllc.com"
.Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"
.Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "sbs.smithllc.local"

When the code running on her system gets to


I get  "Execution of this Application has stopped due to a run-time error, the application can't contiune and will be shut down."

Is there something that needs to be configured in her Exchange server?  
ExchangeMicrosoft Access

Avatar of undefined
Last Comment
Richard Daneke

8/22/2022 - Mon

If you have POP enabled on your exchange server, grant the user access to POP3 and configure it the same as the verizon account (you might need to substitute port 25 for 587 for SMTP. by default exchange uses both ports but internal designation is 587.
Richard Daneke

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

spiderwik2007:  Let me check that and see if it will work.

DoDahD:  The application uses Access 2003 runtime. I'll check, but  I don't think that would be compatible.
Richard Daneke

You are correct.   The macro is not available in 2003.  Your version issue was not clear.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes