Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works
Anything · Lazarus or Delphi
Random projectRandom project

mail4delphi

Mail4Delphi uses the Indy component to send the email.

View on GitHub

Member rating

No ratings yet.

Sign in to rate this project.

README

Mail4Delphi uses the Indy component to send the email.!
Compatible with Lazarus/FPC

Donate

Prerequisites

  • [Required] You need to have the libeay32.dll and ssleay32.dll dynamic library files.

Boss Installation

  • [Optional] For ease I recommend using the Boss (Dependency Manager for Delphi) for installation, simply by running the command below on a terminal (Windows PowerShell for example):
pascal
boss install github.com/juliosenha/mail4delphi

Manual Installation

If you choose to install manually, simply add the following folder to your project, in Project > Options > Resource Compiler > Directories and Conditionals > Include file search path

pascal
../mail4delphi/src

Getting Started

pascal
uses Mail4Delphi;

Send email

pascal
begin
  TMail.New
    .From('from', 'name')
    .SSL(true)
    .Host('host')
    .Port(443)
    .Auth(true)
    .UserName('user')
    .Password('pass')
    .ReceiptRecipient(false)
    .AddTo('to', 'name')
    .AddCC('cc', 'name')
    .AddBCC('cco', 'name')    
    .Subject('subject')
    .AddBody('message')
    .AddAttachment(nil)
    .SendMail;
end;

Samples

Check out our sample project for each situation presented above in operation. If you have any questions or suggestion, please contact, make your pull request or create an issue.

Mail4Delphi

License

Mail4Delphi is free and open-source software licensed under the MIT License.

:point_right: Alone we go faster. Together we go further.