Enviar email indicando outro endereço pra resposta

Projeto [x]Harbour - Compilador de código aberto compatível com o Clipper.

Moderador: Moderadores

Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

Enviar email indicando outro endereço pra resposta

Mensagem por JoséQuintas »

Estou usando meu email genérico pra enviar NFE, até aí tudo bem.
Mas... tem acontecido muito de responderem esses emails, que vém pra mim, e não para o cliente.

Lembro que havia uma opção return-path ou algo assim, pra que a resposta fosse pra um email diferente do envio.
Existe essa possibilidade no email da hbtip?
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Avatar do usuário
alaminojunior
Colaborador
Colaborador
Mensagens: 1717
Registrado em: 16 Dez 2005 21:26
Localização: Ubatuba - SP

Enviar email indicando outro endereço pra resposta

Mensagem por alaminojunior »

No envio usando CDOSYS existe a propriedade ReplyTo
E olhando os fontes da HBTip encontrei o seguinte:

Código: Selecionar todos

FUNCTION HB_SendMail( cServer, nPort, cFrom, aTo, aCC, aBCC, cBody, cSubject, aFiles, cUser, cPass, cPopServer, nPriority, lRead, lTrace, lPopAuth, lNoAuth, nTimeOut, cReplyTo )

Atenção para o último parâmetro
Compilador xHarbour 1.2.3 + Embarcadero C++ 7.30
MySQL c/ SQLRDD
HwGui + GTWVG
Avatar do usuário
asimoes
Colaborador
Colaborador
Mensagens: 4919
Registrado em: 26 Abr 2007 16:48
Localização: RIO DE JANEIRO-RJ

Enviar email indicando outro endereço pra resposta

Mensagem por asimoes »

Consegui fazer o Reply To ( responder para ) usando a tip_MailSend
►Harbour 3.x | Minigui xx-x | HwGui◄
Pense nas possibilidades abstraia as dificuldades.
Não corrigir nossas falhas é o mesmo que cometer novos erros.
A imaginação é mais importante que o conhecimento. (Albert Einstein)
Avatar do usuário
JoséQuintas
Administrador
Administrador
Mensagens: 20267
Registrado em: 26 Fev 2007 11:59
Localização: São Paulo-SP

Enviar email indicando outro endereço pra resposta

Mensagem por JoséQuintas »

Faz tempo que não olhava isso, antes não tinha a opção.
Atenção que aqui é no Harbour 3.4
/*
cServer -> Required. IP or domain name of the mail server
nPort -> Optional. Port used my email server
cFrom -> Required. Email address of the sender
xTo -> Required. Character string or array of email addresses to send
the email to
xCC -> Optional. Character string or array of email addresses for
CC (Carbon Copy)
xBCC -> Optional. Character string or array of email addresses for
BCC (Blind Carbon Copy)
cBody -> Optional. The body message of the email as text, or the
filename of the HTML message to send.
cSubject -> Optional. Subject of the sending email
aFiles -> Optional. Array of attachments to the email to send
cUser -> Required. User name for the POP3 server
cPass -> Required. Password for cUser
cPopServer -> Required. POP3 server name or address
nPriority -> Optional. Email priority: 1=High, 3=Normal (Standard), 5=Low
lRead -> Optional. If set to .T., a confirmation request is send.
Standard setting is .F.
xTrace -> Optional. If set to .T., a log file is created (smtp-<n>.log).
Standard setting is .F.
If a block is passed, it will be called for each
log event with the message a string, no param on
session close.
lPopAuth -> Optional. Do POP3 authentication before sending mail.
lNoAuth -> Optional. Disable authentication methods
nTimeOut -> Optional. Number os ms to wait default 10000 (10s)
cReplyTo -> Optional.
lSSL -> Optional. Need SSL at connect time
(TLS need this param set to False)
cSMTPPass -> Optional.
cCharset -> Optional.
cEncoding -> Optional.
cClientHost -> Optional. Domain name of the SMTP client in the format
smtp.example.net OR client IP surrounded by brackets
as [127.0.0.1] for IPv4 or as [ipv6:address]
(e.g. '[ipv6:::1]') for IPv6
Note: This parameter is optional for backwards
compatibility, but should be provided to comply with RFC 2812.
*/
FUNCTION tip_MailSend( cServer, nPort, cFrom, xTo, xCC, xBCC, cBody, cSubject, ;
aFiles, cUser, cPass, cPopServer, nPriority, lRead, ;
xTrace, lPopAuth, lNoAuth, nTimeOut, cReplyTo, ;
lSSL, cSMTPPass, cCharset, cEncoding, cClientHost )
José M. C. Quintas
Harbour 3.2, mingw, gtwvg mt, fivewin 25.04, multithread, dbfcdx, MySQL, ADOClass, PDFClass, SefazClass, (hwgui mt), (hmg3), (hmg extended), (oohg), PNotepad, ASP, stored procedure, stored function, Linux (Flagship/harbour 3.2)
"The world is full of kings and queens, who blind our eyes and steal our dreams Its Heaven and Hell"

https://github.com/JoseQuintas/
Responder