1. Go to this page and download the library: Download schema31/php-ci-mailer 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/ */
schema31 / php-ci-mailer example snippets
$config = [];
$config['protocol'] = 'smtp';// mail, sendmail, smtp
$config['smtp_host'] = 'smtp_host';// SMTP Server Address.
$config['smtp_user'] = 'smtp_user';// SMTP Username.
$config['smtp_pass'] = 'smtp_pass';// SMTP Password.
$config['smtp_port'] = '25';// SMTP Port.
$config['mailtype'] = 'html';// text or html
$config['smtp_timeout'] = '30';// SMTP Timeout (in seconds).
$config['from_email'] = '[email protected]';
$config['from_name'] = 'CI MAILER';
$config['prefix_subject'] = 'Mailer - ';
$mailer = new \Schema31\CiMailer\Mailer($config);
$mailer = new \Schema31\CiMailer\Mailer();
//...
echo $mailer->printDebugger();
$mailer = new \Schema31\CiMailer\Mailer();
//Method chaining is allowed
$mailer
->setSingleTo("[email protected]")
->setSubject("Email di prova #" . uniqid())
->setMessage("La email di testo")
->send(); //returns true if the email is sent, false otherwise.
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.