Page 1 of 4
CDOsys sending email
Posted: Fri Jan 17, 2014 11:34 pm
by danielmaximiliano
Hola a todos :
hace tiempo habia publicado la forma de utilizar CDOSYS para el envio de correos
recuerden que a veces es necesario modificar los parametros de Yahoo dado que tiene servidores SMTP distintos para cada region, no sucediendo eso para otros ejemplo : Gmail y Hotmail.
recuerden tambien que es necesario modificar la cuenta en Gmail y Outlook.com y Yahoo para que puedan acceder desde aplicaciones que usan POP3 y SMTP y de esta forma ampliar la lectura y envio de email que no sea desde WebMail
Translate Google
Hello everyone:
had published a while how to use CDOSYS for sending emails
remember that sometimes it is necessary to modify the parameters of Yahoo since each region has different SMTP servers, so not happening for other example: Gmail and Hotmail.
Also remember that you need to modify the account in Gmail and Yahoo Outlook.com and so they can be accessed from applications that use POP3 and SMTP and thus expand the Reading and sending email is not from WebMail
http://windows.microsoft.com/en-us/wind ... e-from-app
https://mail.google.com/mail/#settings/general
- CDOsys sendeer.jpg (84.38 KiB) Viewed 8654 times
- yahoo ok.jpg (66.19 KiB) Viewed 8654 times
Re: CDOsys sending email
Posted: Sun Jan 19, 2014 4:58 pm
by Javier Tovar
Hola danielmaximiliano,
Gracias por compartir, en la semana lo pruebo!
Saludos
Re: CDOsys sending email
Posted: Mon Apr 07, 2014 11:17 pm
by danielmaximiliano
Hi :
How to modify CDOSYS to attach the HTML message body
Re: CDOsys sending email
Posted: Tue Apr 08, 2014 12:20 am
by Javier Tovar
Gracias DanielMaximiliano por compartir!
Saludos
Re: CDOsys sending email
Posted: Tue Apr 08, 2014 1:11 am
by danielmaximiliano
Correct code .
Code: Select all
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
//TODO: To send HTML body, uncomment the following lines:
//cHtml := "<HTML>\n" + ;
// "<HEAD>\n" + ;
// "<TITLE>Sample GIF</TITLE>\n" + ;
// "</HEAD>\n" + ;
// "<BODY><P>\n" + ;
// "<h1><Font Color=Green>Inline graphics</Font></h1>\n" + ;
// "</BODY>\n" + ;
// "</HTML>"
//:TextBody := cHtml
//TODO: To send WEb page in an e-mail, uncomment the following lines and make changes in TODO section.
//TODO: Replace with your preferred Web page
//:CreateMHTMLBody("http://www.microsoft.com" , ;
// CDO.CdoMHTMLFlags.cdoSuppressNone , ;
// "", "" )
//:Subject = "Test SMTP"
If Main.archivos.ItemCount > 0
For k:=1 to Main.archivos.ItemCount
:AddAttachment(Main.archivos.Item(k))
Next k
Endif
:Send()
ENDWITH
Re: CDOsys sending email
Posted: Tue Apr 08, 2014 8:11 am
by serge_girard
Hi Danile,
Thx for sharing!
Serge
Re: CDOsys sending email
Posted: Tue Apr 08, 2014 4:14 pm
by danielmaximiliano
Thank Serge
I made a new version Html to include as part of the email body.
http://hmgforum.com/viewtopic.php?p=33416#p33416
Error correction for opening html file.
Code: Select all
/***********************************************************************/
Function AttachHtml()
/***********************************************************************/
Local ForReading := 1, ForWriting := 2, ForAppending := 8
Local oHtml , oBody
oHtml = CreateObject( "Scripting.FileSystemObject" )
//'Open the file for reading
if (oHtml:FileExists( "Demo.htm" ) )
oBody = oHtml:OpenTextFile( "Demo.htm" , ForReading )
//The ReadAll method reads the entire file into the variable BodyText
cHtmlBody = oBody:ReadAll
Msginfo(" the file Demo.htm was added " , "Attention message" )
Else
Msginfo("Demo.htm not exist in the specified path" , "Attention Message" )
Endif
Return
Re: CDOsys sending email
Posted: Sat May 10, 2014 8:42 am
by serge_girard
Daniel,
Just had time to try sending email but I get following error:
Could not send the message
Error:1
SubC: 1007
OSCode : -2147352567
SubS WINOLE
Description: Transportfunction cannot make connection to server.
When I try with hb_sendmail it works but I don't think it work with content-type HTML?
Any idea what is wrong?
Greetings, Serge
Re: CDOsys sending email
Posted: Fri Mar 20, 2015 12:32 am
by danielmaximiliano
Sorry everyone here on the forum, I missed this topic since those days and possibly not abi browser and past few days I have to read new topics.
el amigo Eduardo Luis me comento mediante email que no funcionaba CDOSYS y si hubo cambios ...
Luis no me di cuenta si hubo cambio en esta fechas en CDOSYS, hubo muchos parches para windows pero no creo que toquen esta dll ya que funciona perfectamente..
lo que note que posiblemente haya yo hecho cambios en el ajuste de configuracion de CDOSYS y no me haya dado cuenta y subo algo que ya habia corregido hace mucho tiempo..
subo de nuevo el proyecto para HMG.3.4.0 probado y funcionando en mi Windows 7 home premium 64 compilado en 32 bits.
Translate Google
Luis Eduardo friend told me via email that did not work CDOSYS and if there were changes ...
Luis did not notice if there was a change in the dates CDOSYS, there were many patches for windows but I do not touch this dll and it works perfectly ..
which note that there may be changes made in adjusting settings CDOSYS and has not realized and upload something that had already corrected a long time ago ..
again upload the project to HMG.3.4.0 tested and running on my Windows 7 home premium 64 compiled in 32 bits.
- CDOSYS.jpg (84.54 KiB) Viewed 7761 times
Re: CDOsys sending email
Posted: Fri Mar 20, 2015 12:38 am
by danielmaximiliano
posiblemente tengan problemas con Gmail dado que tiene nuevas politicas de seguidad..
entren y vefifiquen de bajar el nivel de seguridad para aplicaciones externas a Gmail..
Translate Google
possibly having problems with Gmail since it has new policies seguidad ..
come down and check the security level for external applications to Gmail .
https://security.google.com/settings/se ... vity?pli=1
or
https://www.google.com/settings/security/lesssecureapps