Hola diegolf
no necesitas ningún controlador ActiveX, tan solo necesitas dos componentes que te vienen con las Indy, que son TIdSMTP y TIdMessage en las pestaña Indy Clients, e incluso puedes enviar ficheros adjuntos y autenticación en servidores.
Te dejo parte de mi código por si te sirviera de algo.
Código Delphi
[-]
with SMTP do
begin
Host := 'mail.tuservidorsmtp.com';
HeloName := Copy('[email protected]', Pos('@', '[email protected]')+1,
length('[email protected]')-Pos('@', '[email protected]'));
if lCor_Autentificar then
begin
AuthenticationType := atLogin;
if (cCor_Aut_Usuario <> '') then UserName := cCor_Aut_Usuario
else UserName := '[email protected]';
if (cCor_Aut_Clave <> '') then Password := cCor_Aut_Clave
else Password := 'tucontraseña';
end
else AuthenticationType := atNone;
if nCor_Pue_Smtp <> 0 then Port := nCor_Pue_Smtp
else Port := 25;
end;
with MailMessage do
begin
From.Address := '[email protected]';
From.Name := '[email protected]';
Recipients.EMailAddresses := '[email protected]';
CharSet := 'iso-8859-1';
Subject := teAsunto.Text;
Body.Text := meMensaje.Lines.Text;
end;
if FileExists(teFichero.Text) then
TIdAttachment.Create(MailMessage.MessageParts, teFichero.Text);
try
try
SMTP.Connect(1000);
SMTP.Send(MailMessage);
except on E:Exception do
StatusMemo.Lines.Insert(0, 'ERROR: ' + E.Message);
end;
finally
if SMTP.Connected then SMTP.Disconnect;
end;
Espero te sirva de referencia.
Saludos.