Hi friends, today, January 7, 2026, I managed to send emails very easily

. Here's how:
1. First, create an "app password" from your Google account. Here's the direct link:
https://myaccount.google.com/apppasswords2. Give it any name, and your "app password" will be generated.
3. Now, just enter it instead of your current password. See the example:
program demo;
{$mode objfpc}{$H+}
uses
XMailer, SysUtils;
var
Mail: TSendMail;
begin
Mail := TSendMail.Create;
try
Mail.Sender := 'Erick <erick1@gmail.com>';
Mail.Receivers.Add('micliente@gmail.com');
Mail.Subject := 'Prueba de envío';
Mail.Message.Add('Este correo fue enviado correctamente.');
Mail.Smtp.UserName := 'erick1@gmail.com';
Mail.Smtp.Password := 'HERE_YOUR_APP_PASSWORD';
Mail.Smtp.Host := 'smtp.gmail.com';
Mail.Smtp.Port := '587';
Mail.Smtp.SSL := False;
Mail.Smtp.TLS := True;
Mail.Send;
WriteLn('E-mail sent successfully!');
except
on E: Exception do
WriteLn('Error: ', E.Message);
end;
Mail.Free;
end.
This might be helpful:
//TLS – puerto 587
Mail.Smtp.UserName := 'erick1@gmail.com';
Mail.Smtp.Password := 'HERE_YOUR_APP_PASSWORD';
Mail.Smtp.Host := 'smtp.gmail.com';
Mail.Smtp.Port := '587';
Mail.Smtp.SSL := False;
Mail.Smtp.TLS := True;
// SSL – puerto 465
Mail.Smtp.UserName := 'erick1@gmail.com';
Mail.Smtp.Password := 'HERE_YOUR_APP_PASSWORD';
Mail.Smtp.Host := 'smtp.gmail.com';
Mail.Smtp.Port := '465';
Mail.Smtp.SSL := True;
Mail.Smtp.TLS := False;
✔ What it CAN do:
Send emails via SMTP
Receive via IMAP (if used)
Works 24/7
Doesn't ask for confirmations or pop-ups
Even though the password works perfectly, Gmail does limit sending:
~500 emails/day (personal accounts)
~2000 emails/day (Google Workspace)
Limit per minute (anti-spam)
Repetitive content → suspicious
PD: I downloaded the DLL files from here (libeay32.dll and ssleay32.dll of 32bits)
https://indy.fulgan.com/SSL/espero les pueda ayudar mi aporte, saludos amigos
