TLS and Cdo? (1 Viewer)

ahmed_optom

Registered User.
Local time
Today, 20:07
Joined
Oct 27, 2016
Messages
93
I hope everyone is safe and well.

I currently use cdo to send emails within my front end. Works well, but some smtp servers / accounts require a tls secured connection

I have experimented with

config.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendtls").Value = True

However, it seems to make no difference.

is there a way to send emails within access that can connect with TLS?

thanks
 

Ranman256

Well-known member
Local time
Today, 15:07
Joined
Apr 9, 2015
Messages
4,339
does SendObject work?

DoCmd.SendObject acSendQuery, "qsQuery", acFormatXLS, "name@aol.com", , , "Subject", "message"
 

ahmed_optom

Registered User.
Local time
Today, 20:07
Joined
Oct 27, 2016
Messages
93
Hi Ranman,

the problem with SendObject is that it sends with a 3rd party email program like outlook. I was hoping to not to rely on such a situation.
 

ahmed_optom

Registered User.
Local time
Today, 20:07
Joined
Oct 27, 2016
Messages
93
just for clarity, this is the error i get :
rte tls.jpg
 

ahmed_optom

Registered User.
Local time
Today, 20:07
Joined
Oct 27, 2016
Messages
93

I had a look thanks, I entered the same data and I couldnt get it to work with tls smtp servers. Have you tried it? maybe im doing something wrong or this particular server is difficult. For the record its an nhs.net email.
 

ahmed_optom

Registered User.
Local time
Today, 20:07
Joined
Oct 27, 2016
Messages
93
thank you Gasman,

I have already implemented the suggestions in that article, however, as he suggests the TLS aspect of the CDO appears more experimental than working.

Also Isladogs,

When I used your email form, I did not get any errors. It did not send the email, I clicked send, and nothing happened. I had a look at your code, and I have implemented the same set up already.

I fear that TLS is just not working in the Cdo library.
 

cheekybuddha

AWF VIP
Local time
Today, 20:07
Joined
Jul 21, 2014
Messages
2,272
I seem to recall it might work if you use the UseSSL config item instead - but I can't find any reference right now.
 

isladogs

MVP / VIP
Local time
Today, 20:07
Joined
Jan 14, 2017
Messages
18,209
Yes it does work with TLS. I have used it successfully many times.
You may have noticed this section of code as part of the SendEmailCDO

Code:
'code for STARTTLS
If txtPort = 587 Then
    .Item("http://schemas.microsoft.com/cdo/configuration/sendtls").Value = True
End If

Did you include that?
Have you looked in the Help file that comes with the app? It explains many common errors.
For example try altering the SMTP Authenticate and/or SendUsing and/or UseSSL settings
 

Users who are viewing this thread

Top Bottom