How to send email from within FWH25?

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

Postby Enrico Maria Giordano » Tue Dec 27, 2005 12:00 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8402
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Enrico Maria Giordano » Tue Dec 27, 2005 12:05 pm

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8402
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby James Bott » Tue Dec 27, 2005 4:20 pm

John,

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

James

Code: Select all  Expand view
#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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby John » Wed Dec 28, 2005 6: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.
John
 
Posts: 67
Joined: Mon Dec 26, 2005 7:44 am
Location: The Netherlands

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

Postby John » Wed Dec 28, 2005 12:21 pm

thanks!

but now it says that PCODE version 5 is not supported from ALERT.PRG...
John
 
Posts: 67
Joined: Mon Dec 26, 2005 7:44 am
Location: The Netherlands

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41460
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

Postby John » Wed Dec 28, 2005 2:08 pm

Antonio,

i just sumitted the orderform for the upgrade.

Best regards,

John.
John
 
Posts: 67
Joined: Mon Dec 26, 2005 7:44 am
Location: The Netherlands

Postby Antonio Linares » Wed Dec 28, 2005 2:32 pm

John,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41460
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

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

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

Postby carlos vargas » Fri Dec 30, 2005 8: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)

Code: Select all  Expand view
/*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)
User avatar
carlos vargas
 
Posts: 1704
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Postby John » Sat Dec 31, 2005 7:27 am

Thanks Carlos, but i must specify a host for sending, and i want to use the standard configuration from Outlook Express....
John
 
Posts: 67
Joined: Mon Dec 26, 2005 7:44 am
Location: The Netherlands

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

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