vb.net - Run time error - 2147220973 (80040213) The transport failed to connect to the server while sending mail from vb6 -


i making 1 application in vb6 sends mail application, gives me

run time error - 2147220973 (80040213) transport failed contact server

, did given solution gives before

please if 1 knows solution.

code: code:

{ mstrprocname = "monthlyxlmail_employeeperformance" sfilepath = (app.path & "\timetaken.xls")   iconf.load -1  set flds = iconf.fields set lobj_cdomsg = new cdo.message  lobj_cdomsg.configuration.fields(cdosmtpserver) = trim(rsmail!serverurl) lobj_cdomsg.configuration.fields(cdosmtpserverport) = cint(trim(rsmail!port)) lobj_cdomsg.configuration.fields(cdosmtpusessl) = iif(rsmail!reqssl = "y", true, false)  lobj_cdomsg.configuration.fields(cdosmtpauthenticate) = cdobasic lobj_cdomsg.configuration.fields(cdosendusername) = trim(rsmail!emailid) lobj_cdomsg.configuration.fields(cdosendpassword) = trim(rsmail!emailpassword)                         lobj_cdomsg.configuration.fields(cdosmtpconnectiontimeout) = 30  lobj_cdomsg.configuration.fields(cdosendusingmethod) = cdosendusingport lobj_cdomsg.configuration.fields.update  lobj_cdomsg.to = trim(strmail)  lobj_cdomsg.from = trim(rsmail!emailid)  lobj_cdomsg.subject = iif(len(trim(txtsubject.text)) = 0, "performance report", trim(txtsubject.text))  lobj_cdomsg.textbody = iif(len(trim(txtdescription.text)) = 0, "find attachment", trim(txtdescription.text))  'lobj_cdomsg.htmlbody = strmsg lobj_cdomsg.addattachment (sfilepath)  lobj_cdomsg.send } 

are using gmail 2 factor auth? prevents using smtp basic authentication.

create custom app in gmail security settings add new password messaging application.

1. login gmail account 2. goto https://security.google.com/settings/security/apppasswords 3. choose 'custom' app. 4. typ 'gmail smtp', or 5. click 'generate' 6. give password token. 

use token password in messaging application instead of own password.


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -