FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to send email from within FWH25?
Posts: 99
Joined: Wed Nov 02, 2005 10:40 AM
How to send email from within FWH25?
Posted: Tue Dec 27, 2005 11:10 AM
John wrote:Hi Ask,

thanks for the info, but i have to stick with Harbour, because i can't affort to buy xHarbour.

Best regards,

John.


Xharbour is free .Just download it from www.xharbour.org.Switch to xharbour because harbour has alot of problems.

regards,
A.S.K
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
How to send email from within FWH25?
Posted: Tue Dec 27, 2005 12:00 PM

xHarbour is free just like Harbour (www.xharbour.org).

EMG

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
How to send email from within FWH25?
Posted: Tue Dec 27, 2005 12:05 PM

Replace CREATEOBJECT() with TOleAuto():New().

EMG

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
How to send email from within FWH25?
Posted: Tue Dec 27, 2005 04:20 PM
John,

This code works for me; using FW 2.6 May 2005, Harbour 44, and Outlook Express 6.

James

#include "fivewin.ch"
#include "mail.ch"

function main()
   local oWnd
   define window oWnd
   activate window oWnd on init doit()
return nil

function doit()
   local oMail,aCustomer:={}
   local cSubject:="Test mail"
   local cMessage:="This is a test message."
   aadd(aCustomer,"test@test.nl;test1@test.nl")

   DEFINE MAIL oMail;
   SUBJECT cSubject;
   TEXT cMessage
   oMail:aRecipients:=aCustomer
   ACTIVATE MAIL oMail

   msgInfo("mail sent")

return nil
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 67
Joined: Mon Dec 26, 2005 07:44 AM
How to send email from within FWH25?
Posted: Wed Dec 28, 2005 06:33 AM

Ok, i've downloaded xHarbour and changed the directories in my scriptfiles from Harbour to xHarbour (is that all, or do i have to do more?)

after completely compiling this error pops up:
Program with 1st fun: Alert was compiled by older version, PCODE version 0 is no longer supported - Please recompile.

How do i do this and can i expect more of these warnings?

Best regards,

John.

Posts: 99
Joined: Wed Nov 02, 2005 10:40 AM
How to send email from within FWH25?
Posted: Wed Dec 28, 2005 11:00 AM
John wrote:Ok, i've downloaded xHarbour and changed the directories in my scriptfiles from Harbour to xHarbour (is that all, or do i have to do more?)


after completely compiling this error pops up:
Program with 1st fun: Alert was compiled by older version, PCODE version 0 is no longer supported - Please recompile.

How do i do this and can i expect more of these warnings?

Best regards,

John.


In your link script replace
echo ..\lib\Fiveh.lib ..\lib\FiveHC.lib + >> b32.bc
with
echo ..\lib\Fivehx.lib ..\lib\FiveHC.lib + >> b32.bc

regards
A.S.K
Posts: 67
Joined: Mon Dec 26, 2005 07:44 AM
How to send email from within FWH25?
Posted: Wed Dec 28, 2005 12:21 PM

thanks!

but now it says that PCODE version 5 is not supported from ALERT.PRG...

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to send email from within FWH25?
Posted: Wed Dec 28, 2005 12:46 PM

John,

All the PRGs, including FWH ones, have to be recompiled using the xHarbour build that you are using.

Also, as xHarbour has internally changed recently, your FiveHC.lib will no longer be valid.

The easiest way to solve this is to upgrade your FWH to the current one from https://secure.fivetechsoft.com/english/purchase.html

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 99
Joined: Wed Nov 02, 2005 10:40 AM
How to send email from within FWH25?
Posted: Wed Dec 28, 2005 01:15 PM
John wrote:thanks!

but now it says that PCODE version 5 is not supported from ALERT.PRG...


Maybe an older version of xharbour works.Send me a private mail to send you 0.99.4

regards
A.S.K
Posts: 67
Joined: Mon Dec 26, 2005 07:44 AM
How to send email from within FWH25?
Posted: Wed Dec 28, 2005 02:08 PM

Antonio,

i just sumitted the orderform for the upgrade.

Best regards,

John.

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
How to send email from within FWH25?
Posted: Wed Dec 28, 2005 02:32 PM

John,

Your order has just been processed. Thanks.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 67
Joined: Mon Dec 26, 2005 07:44 AM
How to send email from within FWH25?
Posted: Fri Dec 30, 2005 07:15 AM

Hi!

i've just upgraded to FWH27 and xHarbour, but still i'm getting the '501 bad address syntax' error.

It seems i'm not using the correct string for multiple recipients correctly, because for only one recipient it works.

so what's wrong with the code below?

cCustomer:="test@test.nl;test1@test.nl"
aadd(aCustomer,cCustomer)

DEFINE MAIL oMail ;
SUBJECT cSubject ;
TEXT cMessage
oMail:aRecipients:=aCustomer
ACTIVATE MAIL oMail

Best regards,

John.

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
How to send email from within FWH25?
Posted: Fri Dec 30, 2005 07:18 PM
It seems i'm not using the correct string for multiple recipients correctly, because for only one recipient it works.


As I mentioned in a previous message, that syntax works for me. You could also try a comma or space delimiter instead. Also, try surrounding the address with <>.

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
How to send email from within FWH25?
Posted: Fri Dec 30, 2005 08:59 PM
this is a alternative, using a Dll RkMail.dll for send email

http://202.102.233.250/b2000/ASP/component/email/rkMail.zip


(register the dll using -> c:\>regsvr32 rkmail.dll)

/*creacion de variables locales*/
LOCAL oSMTP
LOCAL cTexto
LOCAL nRecord

/*creacion de objeto*/
oSMTP = CREATEOBJECT('rkMail.SMTP')

/*servidor SMTP de corporacion don bosco*/
oSMTP.AddSMTPHost("mail.cablenet.com.ni")

/*datos del remitente*/
oSMTP.FromAddress = "recepcion@donboscocorp.com"
oSMTP.FromName 	  = "Recepcion de Corporacion Don Bosco"

/*asunto del correo*/
oSMTP.Subject 	  = "Registro de llamadas del " + dtoc(thisform.fecha.Value)

/*datos del receptor principal*/
oSMTP.AddRecipient ("Guillermo Castillo - Gerencia", "gcm@donboscocorp.com")

/*datos de receptores secundarios del correo*/
oSMTP.AddBCC ("Margarita Rodriguez", "atencion-a-cliente@donboscocorp.com")
oSMTP.AddBCC ("Carlos Vargas", "cvargaz@donboscocorp.com")

*acumulacion de registro de llamdas
cTexto = ""

cTexto = cTexto + 	"Hora...:" + time() + CHR(13)+;
         			"De.....:" + "Carlos Vargas" + CHR(13)+;
         			"Para...:" + "Guillermo Castillo" + CHR(13)+;
         			"Mensaje:" + "Hola Mundo" + CHR(13)+;
         			"Atendio:" + "Si" + CHR(13) + CHR(13)


/*asignacion del cuerpo del correo*/
oSMTP.TextBody = cTexto			

/*adjunto atachment*/		
*oSMTP.AddAttachment("fondo.bmp")

/*verificacion de envio de correo*/
IF !oSMTP.SendMail
	/*error en envio*/
	MsgAlert(oSMTP.Response,"Error en envio de correo!")
ELSE
	*envio exitoso
	MsgInfo("Envio de llamadas por correo exitoso!","Informacion")
ENDIF 

/*elimina objeto */
oSMTP := NIL


salu2
carlos vargas
Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 67
Joined: Mon Dec 26, 2005 07:44 AM
How to send email from within FWH25?
Posted: Sat Dec 31, 2005 07:27 AM

Thanks Carlos, but i must specify a host for sending, and i want to use the standard configuration from Outlook Express....

Continue the discussion