Hi to all ,
I tested the sample code posted by Daniel Maximiliano using Collaboration Data Objects
and really it worked fine to sending only email without attachments.
viewtopic.php?f=5&t=1518&p=20113#p20113
Anybody knows how to get CDO working properly with attachments ??
TIA,
[]´s Salamandra
About CDOSYS (Collaboration Data Objects) and attachments
Moderator: Rathinagiri
- salamandra
- Posts: 311
- Joined: Thu Jul 31, 2008 8:33 pm
- DBs Used: DBF, MySQL, SQL
- Location: Brazil
About CDOSYS (Collaboration Data Objects) and attachments
There is one time in which is crucial awakening. That time is now. ( Buddha )
- danielmaximiliano
- Posts: 2611
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: About CDOSYS (Collaboration Data Objects) and attachment
Hi / Hola Salamandra :
CdoSys tiene como enviar un archivo adjunto , eh intentado activar dicha funcion pero me da error, estoy investigando cual es la falla,apenas lo resuelva subo la modificacion.
Translate Google
CdoSys is to send an attachment, eh tried to activate this function but I get error, I am researching which is the fault, just upload the modified work it out.
CdoSys tiene como enviar un archivo adjunto , eh intentado activar dicha funcion pero me da error, estoy investigando cual es la falla,apenas lo resuelva subo la modificacion.
Translate Google
CdoSys is to send an attachment, eh tried to activate this function but I get error, I am researching which is the fault, just upload the modified work it out.
Code: Select all
loMsg := CREATEOBJECT ( "CDO.Message" )
WITH OBJECT loMsg
:Configuration := loCfg
:From := Main.cFrom.Value
:To := Main.cTo.Value // <----- Coloca aqui tu direcci¢n de correo
:Subject := "Prueba con DO"
:TextBody := Main.Contenido.Value
:AddAttachment := "c:\Main.prg" /*** Lineas a agregar ****/
:Send()
ENDWITH
Nota sobre archivos adjuntos : si se desea enviar varios archivos en el mismo mensaje , se debe ejecutar el método para cada archivo, por ejemplo :
CDO.AddAttachment (Adjunto 1)
CDO.AddAttachment (Adjunto 2)
CDO.AddAttachment (Adjunto 3)
... resto de código
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- danielmaximiliano
- Posts: 2611
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: About CDOSYS (Collaboration Data Objects) and attachment
ya encontre la solucionCdoSys tiene como enviar un archivo adjunto , eh intentado activar dicha funcion pero me da error, estoy investigando cual es la falla,apenas lo resuelva subo la modificacion.
Translate Google
CdoSys is to send an attachment, eh tried to activate this function but I get error, I am researching which is the fault, just upload the modified work it out.
Code: Select all
loMsg := CREATEOBJECT ( "CDO.Message" )
WITH OBJECT loMsg
:Configuration := loCfg
:From := Main.cFrom.Value
:To := Main.cTo.Value
:Subject := "Prueba con DO"
:TextBody := Main.Contenido.Value
:AddAttachment("c:\Main.prg")
:Send()
ENDWITH
Code: Select all
:AddAttachment("c:\Main.prg","file2","file3",more,,)
or
:AddAttachment("c:\Main.prg")
:AddAttachment("File2")
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- salamandra
- Posts: 311
- Joined: Thu Jul 31, 2008 8:33 pm
- DBs Used: DBF, MySQL, SQL
- Location: Brazil
Re: About CDOSYS (Collaboration Data Objects) and attachment
Hi Daniel ,
Thanks you for your reply.
I´ll try this way and post result here.
[]´s Salamandra
Thanks you for your reply.
I´ll try this way and post result here.
[]´s Salamandra
There is one time in which is crucial awakening. That time is now. ( Buddha )
- salamandra
- Posts: 311
- Joined: Thu Jul 31, 2008 8:33 pm
- DBs Used: DBF, MySQL, SQL
- Location: Brazil
Re: About CDOSYS (Collaboration Data Objects) and attachment
Hi Daniel ,
Tested the following code and it worked fine
Thanks again for your help
[]´s Salamandra
Tested the following code and it worked fine
Code: Select all
loMsg := CREATEOBJECT ( "CDO.Message" )
WITH OBJECT loMsg
:Configuration := loCfg
:From := Main.cFrom.Value
:To := Main.cTo.Value
:Subject := "e-Mail test using <<< CDOSYS (Collaboration Data Objects) >>>"
:TextBody := Main.Contenido.Value
For k:=1 to Main.archivos.ItemCount
:AddAttachment(Main.archivos.Item(k))
Next k
:Send()
ENDWITH
[]´s Salamandra
There is one time in which is crucial awakening. That time is now. ( Buddha )