FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Sending email
Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM
Sending email
Posted: Fri Feb 24, 2012 05:44 PM

Hi everybody,

I send email with success with this:

oCfg := CREATEOBJECT( "CDO.Configuration" )
WITH OBJECT oCfg:Fields
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpserver" ):Value := cServ
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpserverport" ):Value := nPort
:Item( "http://schemas.microsoft.com/cdo/configuration/sendusing" ):Value := 2
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpauthenticate" ):Value := lAut
:Item( "http://schemas.microsoft.com/cdo/configuration/smtpusessl" ):Value := lSSL
:Item( "http://schemas.microsoft.com/cdo/configuration/sendusername" ):Value := cUser
:Item( "http://schemas.microsoft.com/cdo/configuration/sendpassword" ):Value := cPass
:Update()
END WITH

But if i try to send a second email without close the program freeze, how i can release this object?

Thanks in advance.

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Sending email
Posted: Sat Feb 25, 2012 10:56 AM

Try

oCfg:End()

or

oCfg = NIL

EMG

Posts: 332
Joined: Thu Nov 17, 2005 09:11 PM
Re: Sending email
Posted: Sat Feb 25, 2012 01:04 PM
Enrico Maria Giordano wrote:Try

oCfg:End()

or

oCfg = NIL

EMG


Thanks Enrico i will try.

Continue the discussion