Use Indy components installed with Delphi. It contains SMTP component that made this job as easiest way.
procedure SendSimpleMail;
var
Msg: TIdMessage;
DestAddr: TIdEmailAddressItem;
begin
Msg := TIdMessage.Create(Self);
Msg.From.Text := ‘restive98’;
Msg.From.Address := ‘info@programminghorizon.com‘;
Msg.Subject := ‘Test’;
DestAddr := Msg.Recipients.Add;
DestAddr.Text := ‘restive98’;
DestAddr.Address := ‘nice_fox102@yahoo.com‘;
Msg.Body.Add(‘This is simple test mail.’);
IdSMTP1.Host := ‘mail.programminghorizon.com’;
IdSMTP1.Port := 25;
IdSMTP1.AuthenticationType := atLogin;
IdSMTP1.Username := ‘info@ProgrammingHorizon.com‘;
IdSMTP1.Password := ‘*********’;
IdSMTP1.Connect;
IdSMTP1.Authenticate;
IdSMTP1.Send(Msg);
IdSMTP1.Disconnect;
end;