¿Qué estoy haciendo mal? Dice que envió, pero no llega a mi Webmail.
- Code: Select all Expand view RUN
#include "FiveWin.ch"
#include "outlook.ch"
#include "Mail.ch"
FUNCTION Main()
ENVIAR_MAIL_VIA_OUTLOOK2007()
RETURN NIL
FUNCTION ENVIAR_MAIL_VIA_OUTLOOK2007()
LOCAL EmSend := .T.
LOCAL oOutlook, oEmail, oNameSpace, oMailItem
LOCAL EmFile := "TEXTO.TXT"
TRY
oOutLook := GetActiveObject("Outlook.Application")
// oNameSpace := oOutLook:GetNameSpace("MAPI")
EmSend := .T.
CATCH
TRY
oOutLook := GetActiveObject("Outlook.Application")
// oNameSpace := oOutLook:GetNameSpace("MAPI")
EmSend := .F.
CATCH
EmSend := .F.
END
END
IF .NOT. EmSend
ShellExecute(,"Open","Outlook",,,3) // 7
EmSend = .T.
ENDIF
TRY
IF EmSend
oMailItem:To := "joao@pleno.com.br;"
oEmail := oOutlook:CreateItem( oMailItem )
// oEMail:To := "kapiabafwh@gmail.com"
oEmail:Subject := "Proposta NUOVA/MODIFICA Frase"
oEmail:Body := "Body do Email no OutLook"
oEmail:Recipients:Add( "joao@pleno.com.br" )
oEmail:Attachments:Add( EmFile )
oEmail:Display()
ENDIF
CATCH
EmSend := .F.
END
RETURN NIL
// FIM
Regards, saludos.