'Indy 10 TIdSMTP Messaging in BCB 6

In an application developed with Borland C++Builder 6, I am using TIdSMTP and TIdMessage to send email messages. Due to problems for external applications with the usual mail server in the configuration, I am defining the connection data through my Gmail account as follows:

Correo->From->Address           = "******@******.org";
Correo->ReplyTo->EMailAddresses = "******@******.org";
Correo->From->Name              = "*******";
Correo->Organization            = "*******";

Enviar->Host     = "smtp.gmail.com";
Enviar->Password = "******";
Enviar->Port     = 465;
Enviar->Username = "******@gmail.com";
Enviar->UseTLS   = utUseImplicitTLS;

SSLIOHandler->Port               = 465;
SSLIOHandler->Host               = "smtp.gmail.com";
SSLIOHandler->Destination        = "smtp.gmail.com:" + IntToStr(SSLIOHandler->Port);
SSLIOHandler->SSLOptions->Method = sslvTLSv1_2;
SSLIOHandler->SSLOptions->Mode   = sslmUnassigned;

The emails are sent without any problem, but I am checking that in addition to the copies that I send one to my Gmail address. I have verified that the Gmail address appears in the message headers in the Return-Path field.

I have been looking and, at least in Indy 10 for BCB 6, I have not found how to modify that field. How can I get copies to only reach the address indicated in the ReplyTo field of TIdMessage?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source