Jump to content
Fivewin Brasil

Ajuda com Proxy


ecmsoft

Recommended Posts

Estou utilizando a classe TSmtp() para envio de e-mail´s e funciona 100%.

Gostaria de saber como faço para utilizá-la com conexçao proxy.

Veja o exemplo a baixo:

function EnvioEmail()

Local oOutMail

oWnd:SetMsg( "Sending Internet email..." )

WSAStartup()

oOutMail := TSmtp():New( GetHostByName ( 'smtp.servidordeemail.com.br' ))

id=red>

cFrom :='meuemail@servidor.com.br'

cTo :='emaildocliente@servidor.com.br'

cSubject :='Testando envio de email pelo proxy'

lUrgente :=.t.

cBody :='Teste'

oOutMail:bConnecting = { || oWnd:SetMsg( "Conectando ao servidor de e-mail..." ) }

oOutMail:bConnected = { || (oWnd:SetMsg("Conexão estabelecida." ),oWnd:SetMsg('Enviando mensagem...') ) }

oOutMail:bDone = { || (oWnd:SetMsg( "Mensagem enviada com sucesso !" ),oOutMail:End()) }

oOutMail:bFailure = { || oWnd:SetMsg( "Erro ao enviar e-mail !" ) }

oOutMail:cPriority:=if(lUrgente,'high','normal')

oOutMail:SendMail( cFrom,; // From

{ cTo },; // To

cBody,; // Msg Text

cSubject,; // Subject

aAttach ) // attached files

RETURN NIL

Tentei utilizar a classe Tproxy(), mas não obtive sucesso !

marciano.jpg

Marciano Queiroz

Teixeira de Freitas-Ba

FW 10.12 + xHb 1.2.1 | BCC 5.82 | SQLLIB | PAF-ECF | TEF | NF-e | SPED Fiscal | PBM´s | Biometria | Ret.XML NF-e

Link to comment
Share on other sites

Estou utilizando a classe TSmtp() para envio de e-mail´s e funciona 100%.

Gostaria de saber como faço para utilizá-la com conexçao proxy.

Veja o exemplo a baixo:

function EnvioEmail()

Local oOutMail

oWnd:SetMsg( "Sending Internet email..." )

WSAStartup()

oOutMail := TSmtp():New( GetHostByName ( 'smtp.servidordeemail.com.br' ))

id=red>

cFrom :='meuemail@servidor.com.br'

cTo :='emaildocliente@servidor.com.br'

cSubject :='Testando envio de email pelo proxy'

lUrgente :=.t.

cBody :='Teste'

oOutMail:bConnecting = { || oWnd:SetMsg( "Conectando ao servidor de e-mail..." ) }

oOutMail:bConnected = { || (oWnd:SetMsg("Conexão estabelecida." ),oWnd:SetMsg('Enviando mensagem...') ) }

oOutMail:bDone = { || (oWnd:SetMsg( "Mensagem enviada com sucesso !" ),oOutMail:End()) }

oOutMail:bFailure = { || oWnd:SetMsg( "Erro ao enviar e-mail !" ) }

oOutMail:cPriority:=if(lUrgente,'high','normal')

oOutMail:SendMail( cFrom,; // From

{ cTo },; // To

cBody,; // Msg Text

cSubject,; // Subject

aAttach ) // attached files

RETURN NIL

Tentei utilizar a classe Tproxy(), mas não obtive sucesso !

marciano.jpg

Marciano Queiroz

Teixeira de Freitas-Ba

FW 10.12 + xHb 1.2.1 | BCC 5.82 | SQLLIB | PAF-ECF | TEF | NF-e | SPED Fiscal | PBM´s | Biometria | Ret.XML NF-e

Link to comment
Share on other sites

  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...