Page 1 of 1

smtpserver

PostPosted: Wed Sep 28, 2016 3:28 pm
by richard wilson
try to send mail via smtp

error :

session did not complete successfully

STAGE : ST_INIT

IP ADDRESS :

could not establish connection to server1.activedata.ca

WSA ERROR CODE : 10060

can you held me

function SendMail()

local oOutMail, cIP, oOutMail1

oDlg:SetMsg( "Sending Internet email..." )

WSAStartup()
* oOutMail1 := TSmtp():New( cIP := GetHostByName( "mail.lpsi.qc.ca" ) )
oOutMail := TSmtp():New( cIP := GetHostByName( "mail.lpsi.qc.ca" ) )
* MsgInfo( cIP )

oOutMail:bConnecting = { || oDlg:SetMsg( "Connecting to mail.lpsi.qc.ca" ) }
oOutMail:bConnected = { || oDlg:SetMsg( "Connected" ) }
oOutMail:bDone = { || oDlg:SetMsg( "Message sent successfully" ) }

oOutMail:SendMail( "rwilson@lpsi.qc.ca",; // From
{ "wilsonrw@sympatico.ca" },; // To
"It is working!!!",; // Msg Text
"Testing FiveWin Class TSmtp enhancements",; // Subject
{} ) // attached files
* { "testsmtp.prg", "testsmtp.zip" } ) // attached files
* { "alinares@fivetechsoft.com" },; // To
return nil

Re: smtpserver

PostPosted: Thu Sep 29, 2016 4:24 am
by anserkk
Error code WSA 10060 means
Connection timed out.
A connection attempt failed because the connected party did not properly respond after a period of time, or the established connection failed because the connected host has failed to respond.


oOutMail := TSmtp():New( cIP := GetHostByName( "mail.lpsi.qc.ca" ) )

Have you provided the Port number, username password required to connect to your email server
For eg
oOutMail := TSmtp():New( cIP := GetHostByName( "mail.lpsi.qc.ca" ), 25, .t., "username", "Password")

It is better to use CDO for sending emails.

Regards
Anser

Re: smtpserver

PostPosted: Wed Oct 05, 2016 6:10 pm
by richard wilson
try to send mail via smtp

error :

session did not complete successfully

STAGE : ST_INIT

IP ADDRESS :

could not establish connection to server de bell
WSA ERROR CODE : 10060

can you held me

donne la meme erreur (same error)

function SendMail()

local oOutMail, cIP, oOutMail1

oDlg:SetMsg( "Sending Internet email..." )

WSAStartup()
* oOutMail1 := TSmtp():New( cIP := GetHostByName( "mail.lpsi.qc.ca" ) )
oOutMail := TSmtp():New( cIP := GetHostByName( "smtphm.sympatico.ca",25,.t.,"wilsonrw@sympatico.ca", "xxxxxxxx" ) )
* MsgInfo( cIP )

oOutMail:bConnecting = { || oDlg:SetMsg( "Connecting to mail.lpsi.qc.ca" ) }
oOutMail:bConnected = { || oDlg:SetMsg( "Connected" ) }
oOutMail:bDone = { || oDlg:SetMsg( "Message sent successfully" ) }

oOutMail:SendMail( "wilsonrw@sympatico.ca",; // From
{ "rwilson@mail.lpsi.qc.ca" },; // To
"It is working!!!",; // Msg Text
"Testing FiveWin Class TSmtp enhancements",; // Subject
{} ) // attached files
* { "testsmtp.prg", "testsmtp.zip" } ) // attached files
* { "alinares@fivetechsoft.com" },; // To
return nil

richard wilson

Posts: 28
Joined: Sat Mar 04, 2006 3:32 pm
Location: canada

Top

Re: smtpserver

New post

Re: smtpserver

PostPosted: Thu Oct 06, 2016 7:46 am
by anserkk
Are you able to send email using an email client with the given credentials ? This is to ensure the credentials,server, Port number etc are correct.
Did you try CDO ?

Re: smtpserver

PostPosted: Fri Jan 13, 2017 3:14 pm
by richard wilson
setting : I am working in remote with desktop windows ts 2012 did I have to set up other thing to send mail with smtp

Re: smtpserver

PostPosted: Fri Jan 13, 2017 4:06 pm
by Rick Lipkin
Richard

Are you trying SMTP in a clients environment ? .. Many larger corporations will not allow SMTP thru their routers and firewalls due to security concerns and only allow SMTP from certain machine names such as multi function printers.

I became so frustrated with SMTP I changed over to CDO if I want to send messages and even CDO is not reliable in every environment.

Rick Lipkin