smtpserver

Post Reply
richard wilson
Posts: 34
Joined: Sat Mar 04, 2006 3:32 pm
Location: canada

smtpserver

Post 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
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: smtpserver

Post 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
richard wilson
Posts: 34
Joined: Sat Mar 04, 2006 3:32 pm
Location: canada

Re: smtpserver

Post 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
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: smtpserver

Post 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 ?
richard wilson
Posts: 34
Joined: Sat Mar 04, 2006 3:32 pm
Location: canada

Re: smtpserver

Post 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
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: smtpserver

Post 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
Post Reply