1. Go to this page and download the library: Download openclerk/emails 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/ */
openclerk / emails example snippets
Openclerk\Config::merge(array(
"phpmailer_host" => "mail.example.com",
"phpmailer_username" => "mailer",
"phpmailer_password" => "password",
"phpmailer_from" => "[email protected]",
"phpmailer_from_name" => "Example Mailer",
"phpmailer_reply_to" => "[email protected]",
"phpmailer_bcc" => "[email protected]", // if set, send a copy of all emails to this address
// optional values
// "emails_templates" => __DIR__ . "/../emails",
// "emails_additional_css" => __DIR__ . "/../config/custom.css",
));
function setUp() {
Emails\Email::setMockMailer(array($this, "mockMailer"));
}
function tearDown() {
Emails\Email::setMockMailer(null);
}
function mockMailer($to_email, $to_name, $subject, $template, $html_template) {
// do your mock tests...
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.