How to send email from within FWH25?

ask
Posts: 99
Joined: Wed Nov 02, 2005 10:40 am

Post by ask »

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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

John,

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

James

Code: Select all

#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
John
Posts: 67
Joined: Mon Dec 26, 2005 7:44 am
Location: The Netherlands

Post by John »

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.
ask
Posts: 99
Joined: Wed Nov 02, 2005 10:40 am

Post by ask »

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
John
Posts: 67
Joined: Mon Dec 26, 2005 7:44 am
Location: The Netherlands

Post by John »

thanks!

but now it says that PCODE version 5 is not supported from ALERT.PRG...
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
ask
Posts: 99
Joined: Wed Nov 02, 2005 10:40 am

Post by ask »

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
John
Posts: 67
Joined: Mon Dec 26, 2005 7:44 am
Location: The Netherlands

Post by John »

Antonio,

i just sumitted the orderform for the upgrade.

Best regards,

John.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

John,

Your order has just been processed. Thanks.
regards, saludos

Antonio Linares
www.fivetechsoft.com
John
Posts: 67
Joined: Mon Dec 26, 2005 7:44 am
Location: The Netherlands

Post by John »

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.
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

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
User avatar
carlos vargas
Posts: 1421
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Post by carlos vargas »

this is a alternative, using a Dll RkMail.dll for send email

http://202.102.233.250/b2000/ASP/compon ... rkMail.zip


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

Code: Select all

/*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)
John
Posts: 67
Joined: Mon Dec 26, 2005 7:44 am
Location: The Netherlands

Post by John »

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