ecmsoft Posted May 31, 2012 Report Share Posted May 31, 2012 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 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 Quote Link to comment Share on other sites More sharing options...
ecmsoft Posted May 31, 2012 Author Report Share Posted May 31, 2012 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 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 Quote Link to comment Share on other sites More sharing options...
netsys Posted December 22, 2012 Report Share Posted December 22, 2012 Bom dia Marciano Você conseguiu resolver este problema? Como? Obrigado Abs Alberto - SP Quote Link to comment Share on other sites More sharing options...
ecmsoft Posted December 26, 2012 Author Report Share Posted December 26, 2012 Não consegui. Desisti !!!! Marciano Queiroz Teixeira de Freitas-Ba FW 10.12 + xHb 1.2.1 | BCC 5.82 |MySQL|PAF-ECF|TEF|NF-e|SPED|Farm.Popular|Pharmalink|Vidalink|e-Pharma|TRNCentre|Biometria|Ret.XML NF-e Quote Link to comment Share on other sites More sharing options...
netsys Posted December 27, 2012 Report Share Posted December 27, 2012 Ok Mariano Obrigado pela resposta, mesmo assim. Mais alguém passou por isso? Abs Alberto - SP Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.