FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour smtpserver
Posts: 40
Joined: Sat Mar 04, 2006 03:32 PM
smtpserver
Posted: Wed Sep 28, 2016 03:28 PM

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

Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: smtpserver
Posted: Thu Sep 29, 2016 04:24 AM
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
Posts: 40
Joined: Sat Mar 04, 2006 03:32 PM
Re: smtpserver
Posted: Wed Oct 05, 2016 06:10 PM

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

Posts: 1335
Joined: Fri Jun 13, 2008 11:04 AM
Re: smtpserver
Posted: Thu Oct 06, 2016 07:46 AM

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 ?

Posts: 40
Joined: Sat Mar 04, 2006 03:32 PM
Re: smtpserver
Posted: Fri Jan 13, 2017 03:14 PM

setting : I am working in remote with desktop windows ts 2012 did I have to set up other thing to send mail with smtp

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: smtpserver
Posted: Fri Jan 13, 2017 04:06 PM

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

Continue the discussion