Thank You friend rvk, now works
the steps that I followed: (sorry i using google traslate)
I'm using:
* Win10x64
* Lazarus 1.6 32bits
1. i downloaded "xmailer-master.zip" from:
https://github.com/silvioprog/xmailer2. I installed "xmailerpkg.lpk"
3. i copied dll (libeay32.dll and ssleay32.dll) from "xmailer-master\3rdparty\openssl\win32" (o
https://indy.fulgan.com/SSL/) to the directory of my project.
3. In lazarus Proyect -> Inspector of Project -> Add -> new requirement -> name of package, and choose Xmailerpkg.
4. In Edit Source code, i put:
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, XMailer;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
var
Mail: TSendMail;
begin
Mail := TSendMail.Create;
try
// Mail
Mail.Sender := 'ericktux <ericktux@hotmail.com>';
Mail.Receivers.Add('client_01@hotmail.com');
Mail.Subject := 'Hello';
Mail.Message.Add('How are you');
mail.Attachments.Add('C:\saludos.log'); // for send files, optional
// SMTP
Mail.Smtp.UserName := 'ericktux@hotmail.com';
Mail.Smtp.Password := 'mypassword';
Mail.Smtp.Host := 'smtp.live.com';
Mail.Smtp.Port := '587';
//Mail.Smtp.SSL := True;
mail.Smtp.FullSSL:=false; // thanks rvk
Mail.Smtp.TLS := True;
Mail.Send;
ShowMessage('SUCCESS :) ');
{except
on E:Exception do
end;}
finally
Mail.Free;
end;
end;
end.
Works for Hotmail, Gmail and Yahoo