La Web del Programador: Comunidad de Programadores
 
    Pregunta:  16045 - COMO ENVIAR CORREO SIN OUTLOOK
Autor:  Marcelo Gallardo
Si fueran tan amables de ayudarme , deseo enviar correo desde fox sin utilizar el outlook
Gracias por sus respuestas

  Respuesta:  wences
Pregunta , si no tienes outlook , se supone que tendras algun otro programa de correo , sino dificil solucion vas a tener ....este codigo que te envio uno funciona con outllok , otro con express:

objSession = CREATEOBJECT("mapi.session")
objSession.Logon("wesanto")

*Create a new message in the Outbox
objMessage = objSession.outbox.Messages.Add

*Populate a few basic properties of the message
objMessage.Subject = "wenceslao"
objMessage.Text = "Texto del mensaje"
* objMessage.Attachments.Add("impresos.rtf", 0, 1, "c:\impresos.rtf")

*Add a Recipient to the message we just created and resolve
objRecip = objMessage.Recipients.Add
*Alias of who you are sending to
objRecip.name = "[email protected]"
objRecip.Resolve

*Send it
objMessage.update

*Clean up then bail
objSession.Logoff
RELEASE objRecip, objMessage, objSession
________________

oleMMess=createobject("msmapi.mapimessages")
oleMSess=createobject("msmapi.mapisession")
oleMSess.signon
OleMMess.sessionid=OleMSess.sessionid
OleMMess.msgindex=-1
OleMMess.compose
set default to "C:\encripta" && pierde el path ojo....
OleMMess.Recipdisplayname="[email protected]"
OleMMess.recipaddress=""
OleMMess.msgnotetext="Prueba de correo texto"
OleMMess.msgsubject="Comentario del corrreo"
OleMMess.attachmentindex=0
OleMMess.attachmentposition=0
OleMMess.attachmentpathname="c:\impresos.doc"
OleMMess.attachmentname=""
OleMMess.attachmenttype=0
OleMMess.send(0)
OleMSess.signoff
clear all

Espero te sirva...