PHP code example of phore / mail

1. Go to this page and download the library: Download phore/mail 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/ */

    

phore / mail example snippets


$mailer = new PhoreMailer();
$mailer->config([
    "Host"      => "smtp1.example.org;smtp2.example.org",
    "Username"  => "[email protected]",
    "Password"  => "secret", 
    "SMTPAuth"  => true
]);
$mailer->send($templateText, ["name"=>"Joe Doe"]);

$mailer = new PhoreMailer();
$mailer->phpmailer->phpMailerFunction();

$mailer = new PhoreMailer();
$mailer->textTemplate->textTemplateFunction();

$mailer->setSendMailFunction(function (PHPMailer $mail, PhoreMailer $phoreMailer) {
     $res["to"] = $mail->getAllRecipientAddresses();
     $res["subject"] = $mail->Subject;
     $res["html"] = $mail->Body;
     $res["text"] = $mail->AltBody;
});