Esto mismo ya se respondio mas de una vez , al menos con el outlook ...
No estaria de mas que buscases en las respuestas ...
Este es el codigo de dos formas distintas:
* AM_BareBones.PRG
* ----------------
*
*Create a MAPI Session object then Logon. The Logon dialog can be
*bypassed by providing a valid ProfileName as the first parameter
*(as a string) to the Logon Method.
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.Send
*Clean up then bail
objSession.Logoff
RELEASE objRecip, objMessage, objSession
*EOP: AM_BareBones.PRG
____________________________________
* AM_Attachments.PRG
* ------------------
*
*Create a MAPI Session object then Logon. The Logon dialog can be
*bypassed by providing a valid ProfileName as the first parameter
*(as a string) to the Logon Method as seen below.
objSession = CREATEOBJECT("mapi.session")
objSession.Logon("YourProfileName")
*Create a new message in the Outbox and popula