Maestro, en este ejemplo, como hago para informar el puerto y contrasena?
Ejemplo:
Puerto: 465
Contrasenha: javali123 (Password)
- 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
DEFINE BUTTON OF oBar ACTION SendMail() TOOLTIP "Send Mail"
SET MESSAGE OF oWnd TO "Ready" NOINSET DATE TIME KEYBOARD
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//
function SendMail()
local oOutMail, cIP
oWnd:SetMsg( "Sending Internet email..." )
WSAStartup()
oOutMail := TSmtp():New( cIP := GetHostByName( "smtp.dominio.com.br" ) )
MsgInfo( cIP )
oOutMail:bConnecting = { || oWnd:SetMsg( "Connecting to smtp.dominio.com.br" ) }
oOutMail:bConnected = { || oWnd:SetMsg( "Connected" ) }
oOutMail:bDone = { || oWnd:SetMsg( "Message sent successfully" ) }
oOutMail:SendMail( "joao@dominio.com.br",; // From
{ "joao@dominio.com.br" },; // To
"It is working!!!",; // Msg Text
"Testing FiveWin Class TSmtp enhancements",; // Subject
{ "testsmtp.prg", "testsmtp.zip" } ) // attached files
return nil
//----------------------------------------------------------------------------//
Gracias, saludos