Luis María Guayán
Tucumán, Argentina
_____________________________
http://comunidadvfp.blogspot.com
Luis María Guayán
Tucumán, Argentina
_____________________________
http://comunidadvfp.blogspot.com
Hola! Les adjunto la librería que uso para enviar el mail por el Outlook. La Librería es nigel y lo que hago es pegar la clase mapimail1 en mi formulario y luego se invoca:
Thisform.mapimail1.sendmail("Microsoft Outlook Internet Settings",'',ALLTRIM(lcReceptor),lcAsunto,lcCuerpo,lcAttachments)
Recién envié el adjunto con el código y me reboto el mail. Envíame una dirección de correo que te lo mando.
Este código envía con la cuenta de Outlook predeterminada. Todavía no sé cómo hacer para que envié con otra de las cuentas configuradas.
Saludos,
Roxana
De: Roxana Demattei [mailto:rox...@gmail.com]
Enviado el: sábado, 22 de noviembre de 2014 02:00 a.m.
Para: 'publice...@googlegroups.com'
Asunto: RE: [vfp] Re: Usando MAPI para enviar mails de VFP
Hola! Les adjunto la librería que uso para enviar el mail por el Outlook. La Librería es nigel y lo que hago es pegar la clase mapimail1 en mi formulario y luego se invoca:
Thisform.mapimail1.sendmail("Microsoft Outlook Internet Settings",'',ALLTRIM(lcReceptor),lcAsunto,lcCuerpo,lcAttachments)
Adjunto el código.
Este código envía con la cuenta de Outlook predeterminada. Todavía no sé cómo hacer para que envié con otra de las cuentas configuradas.
Saludos,
Roxana
|
El software de antivirus Avast ha analizado este correo electrónico en busca de virus.
|
Hola!
Adjunto el codigo que uso para enviar un mail desde fox, pero no desde el outlook. Este codigo anda aunque no tenga outloock instalado:
PARAMETERS lcAsunto, lcAttachments, lcReceptor,lcCuerpo,lcAdjuntoTransfe,lcConCopia, lcCopiaOculta
LOCAL loCfg, loMsg, lcFile, loErr
thisform.mailOk = .t.
TRY
loCfg = CREATEOBJECT("CDO.Configuration")
WITH loCfg.Fields
cdoSendUsingPickup = 1
*'Send message using the local SMTP service pickup directory.
cdoSendUsingPort = 2
*'Send the message using the network (SMTP over the network).
cdoAnonymous = 0
* 'Do not authenticate
cdoBasic = 1
*'basic (clear-text) authentication
cdoNTLM = 2
*'NTLM
*!* Set objMessage = CreateObject("CDO.Message")
*!* objMessage.Subject = "Example CDO Message"
*!* objMessage.From = """Me"" <m...@my.com>"
*!* objMessage.To = "te...@paulsadowski.com"
*!* objMessage.TextBody = "This is some sample message text.." & vbCRLF & "It was sent using SMTP authentication."
*!* '==This section provides the configuration information for the remote SMTP server.
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
*'Name or IP of Remote SMTP Server
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "foodcontrol.com"
*'Type of authentication, NONE, Basic (Base64 encoded), NTLM
*.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = .F.
*'Your UserID on the SMTP server
*.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "factu...@foodcontrol.com"
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "factu...@foodcontrol.com"
*'Your password on the SMTP server
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "Foodc_2015"
*'Server port (typically 25)
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
*** ssl
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = .F.
.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 60
.Update
*'==End remote SMTP server configuration section==
*objMessage.Send
*WAIT WINDOWS "HASTA ACA"
ENDWITH
loMsg = CREATEOBJECT ("CDO.Message")
WITH loMsg
.Configuration = loCfg
*-- Remitenete y destinatarios
.From = "Food Control <factu...@foodcontrol.com>"
*.To = "Ventas <ven...@gastrolopardo.com.ar>"
.To = lcReceptor
.Cc = lcConCopia
.Bcc = lcCopiaOculta
*- Notificación de lectura
*.Fields("urn:schemas:mailheader:disposition-notification-to") = .From
* .Fields("urn:schemas:mailheader:return-receipt-to") = .From
.Fields.Update
*-- Tema
.Subject = "Ejemplo del " + TTOC(DATETIME())
.Subject = lcAsunto
.TextBody =lcCuerpo
*.HTMLBody = "<p>Este es un texto HTML con <b>negritas</b> o con <i>cursivas</i>.</p>"
*-- Formato HTML desde la Web
* .CreateMHTMLBody("http://comunidadvfp.blogspot.com/p/acerca-de.html", 0)
*-- Archivo adjunto
* lcFile = GETFILE()
* IF NOT EMPTY(lcFile)
.AddAttachment(lcAttachments)
IF !EMPTY(lcAdjuntoTransfe)
.AddAttachment(lcAdjuntoTransfe)
ENDIF
* ENDIF
*-- Envio el mensaje
.Send()
ENDWITH
CATCH TO loErr
MESSAGEBOX("No se pudo enviar el mensaje" + CHR(13) + ;
"Error: " + TRANSFORM(loErr.ErrorNo) + CHR(13) + ;
"Mensaje: " + loErr.Message , 16, "Error")
thisform.mailOk = .f.
FINALLY
loMsg = NULL
loCfg = NULL
ENDTRY
Ing. Roxana Demattei
De: publice...@googlegroups.com [mailto:publice...@googlegroups.com] En nombre de Carlos Moreno
Enviado el: jueves, 14 de enero de 2016 10:52 a.m.
Para: Comunidad de Visual Foxpro en Español
Asunto: [vfp] Re: Usando MAPI para enviar mails de VFP
Hola roxana buen dia estoy tratando de enviar correo con outlook y no he podido podrías enviarme un código para guiarme, el que yo tengo me genera error, gracias.