vbscript - Sending an email over TLS -


i've try send email using tls , port number 587 server name smtp.gmail.com got error "error '8004020e'". set ssl false because port 587 authentication tls. wrong in code?

set objmail = server.createobject("cdo.message")  set objconfig = createobject("cdo.configuration")  objconfig.fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com" objconfig.fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 587 objconfig.fields("http://schemas.microsoft.com/cdo/configuration/sendusing")    = 2 objconfig.fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 objconfig.fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl")      = false  objconfig.fields("http://schemas.microsoft.com/cdo/configuration/sendusername")    = "xx@gmail.com" objconfig.fields("http://schemas.microsoft.com/cdo/configuration/sendpassword")    = "xx" objconfig.fields("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60  objconfig.fields.update  set objmail.configuration = objconfig  objmail.from     = "xx@gmail.com" objmail.to       = "yy@yahoo.com"  objmail.subject  = "test email" objmail.textbody = "test email" objmail.htmlbody = "fffffffffff"  objmail.send set objmail = nothing 

use port 465 instead , use ssl (smtpusessl = true) gmail.

and have make sure (log in gmail account mailbox, check if there messages, tell previous unsuccessful attempts) mailbox usage "old applications" enabled... (it's new "feature", can enabled on yahoo , google mail servers since not long ago... maybe mobile email clients not work if not set.)


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -