smtpserver

smtpserver

Postby richard wilson » Wed Sep 28, 2016 3: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
richard wilson
 
Posts: 38
Joined: Sat Mar 04, 2006 3:32 pm
Location: canada

Re: smtpserver

Postby anserkk » Thu Sep 29, 2016 4: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
User avatar
anserkk
 
Posts: 1331
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: smtpserver

Postby richard wilson » Wed Oct 05, 2016 6: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
richard wilson
 
Posts: 38
Joined: Sat Mar 04, 2006 3:32 pm
Location: canada

Re: smtpserver

Postby anserkk » Thu Oct 06, 2016 7: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 ?
User avatar
anserkk
 
Posts: 1331
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: smtpserver

Postby richard wilson » Fri Jan 13, 2017 3: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
richard wilson
 
Posts: 38
Joined: Sat Mar 04, 2006 3:32 pm
Location: canada

Re: smtpserver

Postby Rick Lipkin » Fri Jan 13, 2017 4: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
User avatar
Rick Lipkin
 
Posts: 2633
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 41 guests

cron