Nao estou conseguindo enviar e-mail com TLS , o estranho é que pelo TESTE, eu consigo se problemas, mas fazendo pela DLL nao funciona.
a dll do OPENSSL está com a ultima versao.
o estranho é que o arquivo INI quando feito pela DLL , é incluido diversos campos, e pede para cadastrar o SMTP em outro campo
nao entendi porque num funciona e o outro nao.
segue meu programa de teste em foxpro
CLEAR
#Define STR_LEN 256
#Define STR_TO_UTF8 9
#Define UTF8_TO_STR 11
DECLARE integer MAIL_Inicializar IN ACBrMail32.dll String eArqConfig, string eChaveCrypt
DECLARE integer MAIL_ConfigLer IN ACBrMail32.dll String eArqConfig
DECLARE integer MAIL_AddAddress IN ACBrMail32.dll String eEmail,string eNome
DECLARE integer MAIL_SetSubject IN ACBrMail32.dll String eSubject
DECLARE integer MAIL_AddReplyTo IN ACBrMail32.dll String eEmail,string eNome
DECLARE integer MAIL_AddBody IN ACBrMail32.dll String eAltBody
DECLARE integer MAIL_Send IN ACBrMail32.dll integer UseThreadNow
DECLARE integer MAIL_UltimoRetorno IN ACBrMail32.dll string @sMensagem,long @esTamanho
DECLARE integer MAIL_ConfigGravar IN ACBrMail32.dll string @sMensagem
? px("","")
? mail_configLer("d:\MailTeste.ini")
? MAIL_AddAddress("
[email protected]","")
? MAIL_SetSubject("teste do sistema")
? MAIL_AddReplyTo("
[email protected]","")
? MAIL_AddBody("simples teste")
*? mail_configgravar("d:\SAIDA.INI")
? "send",MAIL_Send(0)
ret=SPACE(200)
? "ultimo retorno",MAIL_UltimoRetorno(@ret,1024)
? "ret",ret
FUNCTION px(arqConfig, chaveCrypt)
local hResult, buffer, bufferLen, oErr
arqConfig = Iif(Vartype(arqConfig)#"C", "", arqConfig)
chaveCrypt = Iif(Vartype(chaveCrypt)#"C", "", chaveCrypt)
hResult = MAIL_Inicializar(StrConv(arqConfig, STR_TO_UTF8), StrConv(chaveCrypt, STR_TO_UTF8))
? hresult
ENDFUNC