delphi - Connection timed out when trying to TidSMTP.Connect -


trying connect gmail smtp server fails.

it hangs there ~20 seconds , throws error "socket error #10060 connection timed out".

i've tried copy , paste post, doesn't work also.

procedure tform1.btn1click(sender: tobject); var   email      : tidmessage;   idsmtpgmail: tidsmtp;   idsslgmail : tidssliohandlersocketopenssl; begin   idsslgmail                   := tidssliohandlersocketopenssl.create(nil);   idsslgmail.ssloptions.method := sslvtlsv1;   idsslgmail.ssloptions.mode   := sslmunassigned;    idsmtpgmail                  := tidsmtp.create(nil);   idsmtpgmail.iohandler        := idsslgmail;   idsmtpgmail.usetls           := utuseexplicittls;    email                           := tidmessage.create(nil);   email.from.address              := 'from';   email.recipients.emailaddresses := 'recipient';   email.subject                   := 'test subject';   email.body.text                 := 'test body';    idsmtpgmail.host     := 'smtp.gmail.com';   idsmtpgmail.port     := 587;   idsmtpgmail.username := 'username';   idsmtpgmail.password := 'password';    idsmtpgmail.connect;   idsmtpgmail.send(email);   idsmtpgmail.disconnect;    email.free;   idsslgmail.free;   idsmtpgmail.free;   beep;  end; 

has ideas how solve problem?

are behind firewall, chance?


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -