added basic library,

added instruscions into README
This commit is contained in:
2025-06-21 18:33:36 +02:00
parent 14d8be88aa
commit 8d9ee9a498
5 changed files with 332 additions and 1 deletions

27
examples/example1.php Normal file
View File

@ -0,0 +1,27 @@
<?php
require_once __DIR__ . '/../src/Emailer.php';
use TPsoft\Emailer\Emailer;
$config = array(
'smtp' => array(
'host' => 'smtp.gmail.com',
'port' => 465,
'username' => 'username',
'password' => 'password',
'encryption' => 'ssl'
),
'imap' => array(
'host' => 'imap.gmail.com',
'port' => 993,
'encryption' => 'ssl',
'folder' => 'Sent',
'username' => 'username',
'password' => 'password'
)
);
$emailer = new Emailer($config);
$emailer->send('joe@exemple.com', 'Test at ' . date('Y-m-d H:i:s'), 'Plain text message', '<html><body style="color: red;">HTML message</body></html>');