1. Go to this page and download the library: Download gabriel-binotti/email library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gabriel-binotti / email example snippets
composer
host = nameserve
username = user
password = password
auth = 'true' or 'false'
port = 587 or 465
charset = 'UTF-8'
secure = 'false' or 'true'
use GabrielBinottiEmail\Email;
') // name file .ini
->debug() // active show debug (server, client or off "default is off")
->from("email", "name") // sender's email , name (Can your name or you company...)
->reply("email", "name ") // answer email (optional)
->destination("email", 'name') // recipient email , name
->subject("subject email") // subject email
->bodyHtml('text body') // text body
->options([
"ssl" => [
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
]
])
->send(); // send email
} catch (Exception $e) {
echo $e->getMessage();
}