Page 3 of 4
enviar correo electronico / send eMail
Posted: Fri Aug 22, 2014 11:14 am
by Pablo César
mol wrote:I want to call default program defined by "default programs" from control panel.
It can be outlook, outlook express, thundirbird.
Marek, most probably to get Default Mail Client (for all Windows) is to read REGISTER at:
[HKEY_CLASSES_ROOT\mailto\shell\open\command]
Re: enviar correo electronico / send eMail
Posted: Fri Aug 22, 2014 2:48 pm
by andyglezl
Hola mol
Yo lo utilizo de esta forma y se envia por medio del Outlook de Office que tengo instalado...
-----------------------------------------------------------------------------------------
Hello mol
I use it in this way and is sent through Office Outlook I have installed ...
Code: Select all
cTemp := "url.dll,FileProtocolHandler "
cTemp += "mailto:"+cCTEMAIL
cTemp += "&subject=Confirmacion de Cita - ("+cEmp+")"
cTemp += "&body="
cTemp += "Enviado el "+DTOC(date())+" a las "+TIME()+cSaltLin+cSaltLin
cTemp += cEmp+cSaltLin
cTemp += cDirecci+cSaltLin
cTemp += "Tel: "+cTelefon+cSaltLin
cTemp += cCiudad+cSaltLin+cSaltLin
cTemp += " CLIENTE: "+V2S(cpso4)+cSaltLin
cTemp += " CITA: "+FechTex(cpso2)+" a las "+V2S(cpso3)+cSaltLin
cTemp += " Le Atiende: "+V2S(cpso5)+cSaltLin+cSaltLin // +" - ( "+V2S(cpso6)+" )"
cTemp += "Obsevaciones: "+V2S(cpso7)+cSaltLin+cSaltLin+cSaltLin
cTemp += "Estimado(a) "+SUBSTR(V2S(cpso4),7)+cSaltLin+cSaltLin
cTemp += "Su Cita ha sido registrada, favor de confirmar su asistencia"+cSaltLin
cTemp += "dentro del siguiente periodo para hacerla efectiva."+cSaltLin+cSaltLin
cTemp += "Inicio: "+cSaltLin
cTemp += " Fin: "+cSaltLin+cSaltLin
cTemp += "En caso de NO confirmar su asistencia en el periodo señalado,"+cSaltLin+cSaltLin
cTemp += "se cancelará para reasignarla a otra persona.,"+cSaltLin+cSaltLin
cTemp +="******************************************************"+cSaltLin+cSaltLin
ShellExecute(0, "open", "rundll32.exe", cTemp, , 1)
Re: enviar correo electronico / send eMail
Posted: Fri Aug 22, 2014 2:51 pm
by mol
Thanks!
I'll try it with thunderbird.
edit:
I've tested and I can call my default email program - thunderbird.
But, how to split address from topic and body? Could you post variable values?
How to attach one or list of files to created message?
Regards, Marek
edit:
I've tried this way:
Code: Select all
#include <hmg.ch>
function main
cTemp := "url.dll,FileProtocolHandler "
cTemp += "mailto:Marek (mol@pro.onet.pl)"+"?"
cTemp += "&subject=Próba wysyłki maila"+"?"
cTemp += "&body=tutaj jakaś przykładowa treść"
cTemp += "&Attach=c:\\projekty\\testy\\email z windowsa\\wyslijemail.prg"
ShellExecute(0, "open", "rundll32.exe", cTemp, , 1)
return
everything works ok against attachment

Re: enviar correo electronico / send eMail
Posted: Fri Aug 22, 2014 5:11 pm
by andyglezl
Lo siento mol...
Sorry mol ...
Code: Select all
LOCAL cSaltLin:= "%0D%0A"
cTemp := "url.dll,FileProtocolHandler "
cTemp += "mailto:Marek (mol@pro.onet.pl)"+cSaltLin
cTemp += "&subject=Próba wysyłki maila"+cSaltLin
cTemp += "&body=tutaj jakaś przykładowa treść"
cTemp += "&Attach=c:\\projekty\\testy\\email z windowsa\\wyslijemail.prg"
ShellExecute(0, "open", "rundll32.exe", cTemp, , 1)
Yo no he utilizado el Attach... Será cuestion de investigar...
------------------------------------------------------------------
I have not used the Attach ... It will be a matter of researching ...
Re: enviar correo electronico / send eMail
Posted: Tue May 17, 2016 5:53 pm
by AidTIC
Buenas tarde,
Como puedo añadirle un destinatario oculto ??
Puedo decir desde que cuenta se envia?
*-*-*-*-*-*-*-*-*-*-*-
Good afternoon,
As I can add a hidden recipient ??
I can say from that account is sent?
*-*-*-*-*-*-*-*-*-*-*-*-*
oOutLook := CreateObject("Outlook.Application")
oMail := oOutLook:CreateItem(0)
oRecip := oMail:Recipients
oRecip:Add( cDestino )
oAdjunto:=oMail:Attachments
Re: enviar correo electronico / send eMail
Posted: Tue May 17, 2016 7:50 pm
by trmpluym
I can help you with the BCC
oMail:BCC:="
test@test.com"
Theo
Re: enviar correo electronico / send eMail
Posted: Wed May 18, 2016 1:10 am
by danielmaximiliano
Re: enviar correo electronico / send eMail
Posted: Wed May 18, 2016 11:41 am
by AidTIC
Ok, lo pruebo esta tarde y os cuento.
No habría documentación para poder ver toldos los parámetros y variables?
Pues estaba intentado crear el correo con las imágenes embebidas, type mime, y no doy con la tecla.
Gracias
Re: enviar correo electronico / send eMail
Posted: Wed May 18, 2016 2:56 pm
by AidTIC
hola,
Ya lo he solucionado,era un error al transcribir la variable. Gracias
acabo de probarlo
cdestino :="ejemplo@domio.com"
oMail := oOutLook:CreateItem(0)
oRecip := oMail:Recipients
oRecip:Add( cDestino )
oMail:BCC:= "ejemplo@domio.com"
Solo me crea el correo con la cuenta BCC la Para, me la deja en blanco
cdestino :="ejemplo@domio.com"
oMail := oOutLook:CreateItem(0)
oRecip := oMail:Recipients
oRecip:Add( "ejemplo@domio.com")
oMail:BCC:= "ejemplo@domio.com"
Asi si que me crea el PARA y el CCO, pero claro, necesito utilizar la variable.
he probado también
oMail:to := "ejemplo@domio.com" y oMail:to := cDestino
pero lo mismo
Que puede pasar, estoy gastando hmg.3.4.2
Re: enviar correo electronico / send eMail
Posted: Mon May 23, 2016 11:42 am
by AidTIC
Me faltaría saber como puedo decir desde que cuenta se envía?
Tengo varias cuentas configuradas en Outlook, y cuando mando siempre me coge la cuenta predeterminada, hay manera que me coja la que yo le indique?
*-*-*-*-*-*-*-*-*-*-*-
Fail me know how I can say is sent from that account?
I have multiple accounts configured in Outlook, and as always send me take the default account, no way I hold my instructed?
*-*-*-*-*-*-*-*-*-*-*-*-*
cdestino :="ejemplo@domio.com"
oMail := oOutLook:CreateItem(0)
oRecip := oMail:Recipients
oRecip:Add( cDestino )
oMail:BCC:= "ejemplo@domio.com"