SimpleMail
- Archived · last change 7-14-2023
- ★ 2 on GitHub
README
SimpleMail is a library to facilitate the sending of messages through SMTP connections.
⚙️ Installation
- Manual installation: Add the following folders to your project, in Project > Options > Resource Compiler > Directories and Conditionals > Include file search path
../SimpleMail/src- Installation using the Boss:
boss install github.com/weslleycapelari/SimpleMail🔰 Engines
By default, the library uses the most up-to-date components, in this case the current one is Indy.
⚡️ Quickstart
You need to use SimpleMail
uses SimpleMail;- Mail Server
var
LMailer: IMail;
begin
LMailer := TMail.New
.Hostname('smtp.gmail.com')
.Port(465)
.Username('example@gmail.com')
.Password('password')
.SSL(True)
.Timeout(10000)
.Connect;
if LMailer.IsConnected then
ShowMessage('Connected')
else
ShowMessage('Not Connected');
end;- Message
var
LMailer : IMail;
LMessage: IMessage;
begin
LMailer := TMail.New
.Hostname('smtp.gmail.com')
.Port(465)
.Username('example@gmail.com')
.Password('password')
.SSL(True)
.Timeout(10000)
.Connect;
if LMailer.IsConnected then
begin
LMessage := LMailer.NewMessage
.From('example@gmail.com')
.Recipients('example1@gmail.com;example2@gmail.com')
.CC('example3@gmail.com;example4@gmail.com')
.CCo('example5@gmail.com;example6@gmail.com')
.Subject('Test Email')
.Body('This is a test message')
.Send;
LMailer.SendMessage(LMessage);
end;
end;📝 Samples
A project was developed inside the example folder
💻 Code Contributors
⚠️ License
SimpleMail is free and open-source software licensed under the Apache-2.0 License.


