En principio he probado con el ejemplo de FWH y parece ser que los envía bien.
- Code: Select all Expand view
- // Testing FiveWin new Internet Outgoing mail (SMTP protocol) Class
#include "FiveWin.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
local oBar
DEFINE WINDOW oWnd TITLE "Sending Internet Mail from FiveWin"
DEFINE BUTTONBAR oBar _3D OF oWnd
// Hago 5 envíos de golpe
DEFINE BUTTON OF oBar ACTION (SendMail("1"),SendMail("2"),SendMail("3"), SendMail("4"), SendMail("5")) TOOLTIP "Send Mail"
SET MESSAGE OF oWnd TO "Ready" NOINSET DATE TIME KEYBOARD
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
function SendMail(cTexto)
local oOutMail, cIP
oWnd:SetMsg( "Sending Internet email..." )
WSAStartup()
oOutMail := TSmtp():New( cIP := GetHostByName( "sigev.com" ), 25, .t., "usuario", "xxxxxxxxxx")
oOutMail:bConnecting = { || oWnd:SetMsg( "Connecting to sigev.com ..." ) }
oOutMail:bConnected = { || oWnd:SetMsg( "Connected" ) }
oOutMail:bDone = { || oWnd:SetMsg( "Message sent successfully" )}
oOutMail:oSocket:lDebug:=.T.
oOutMail:oSocket:cLogFile:="smtp.log"
oOutMail:cReplyTo:="angel@sigev.com"
oOutMail:nDelay := 1
oOutMail:SendMail( "angel@sigev.com",; // From
{ "angel@sigev.com" },; // To
"Probando mensaje : "+cTexto,; // Msg Text
"Testing FiveWin Class TSmtp enhancements",; // Subject
{ "testsmtp.prg" } ) // attached files
return nil
Muchas gracias