Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDO TLS or SSL

Status
Not open for further replies.

foxup

Programmer
Dec 14, 2010
319
0
16
CA
Hi,

I have this script that works great except when I send to people who have there email at "anybody@google.ca". I've been reading that it's a TLS or SSL problem with my script.

How do I fix it so that it uses TLS or SSL?

Here is the script:

LOCAL iMsg,iConf
DECLARE SHORT InternetGetConnectedState IN wininet.DLL;
INTEGER @lpdwFlags, INTEGER dwReserved
lConnect=displayState()
IF lConnect
iMsg = CREATEOBJECT("CDO.Message")
iConf = CREATEOBJECT("CDO.Configuration")
Flds = iConf.FIELDS
WITH Flds
.ITEM(" = 2
.ITEM(" = 'xxx.xx.xx' &&IP
.ITEM(" = 25
.UPDATE()
ENDWITH
WITH iMsg
.Configuration = iConf
.TO = m.emal
.BCC = ""
.FROM = "me@me.ca"
.Subject = "STTTTTT"
.FIELDS("Priority").VALUE = 0 && -1=Low, 0=Normal, 1=High
.FIELDS.UPDATE()
IF has_txt=.F. && HAS ONLY PDF (NO TXT FILE EXISTS)
bod="<img src='cid:logo.png'><BR> Hello,<BR><BR>Hi.<BR>"
.HtmlBody=bod
ELSE && EXISTS BOTH THE PDF & TXT FILE SO EMAIL BODY IS A LITTLE DIFFERENT
bod="<img src='cid:logo.png'><BR>Hello.<BR>"
.HtmlBody=bod
ENDIF
.AddAttachment ("C:\E\logo.png") && ALWAYS DONE SO THAT EVERYBODY HAS THE LOGO
.SEND()
ENDWITH
iMsg = .NULL.
iConf = .NULL.
Flds = .NULL.
ELSE
MESSAGEBOX("Could not send the message, your internet connection is down.")
ENDIF
PROCEDURE displayState
LOCAL lConnected
lConnected = .F.
lpdwFlags = 0
IF InternetGetConnectedState (@lpdwFlags, 0) = 1
lConnected = .T.
ENDIF
RETURN lConnected
ENDPROC

Please help because the clients that are on Google are not receiving their emails.

Thanks,
FOXUP
 
Oh I fixed it.

I added these 3 lines of code and it send to all my google clients (...@gmail.com)

.Fields(" = 587
.Fields(" = 1
.Fields(" = 60

Just incase anyone else has the same problem.


Thanks,
FOXUP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top