PHP code example of aselsan / codeigniter4-multi-smtp-config
1. Go to this page and download the library: Download aselsan/codeigniter4-multi-smtp-config 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/ */
aselsan / codeigniter4-multi-smtp-config example snippets
helper('multi_email');
$email = multi_email(['mailType' => 'html']);
$email->setTo('[email protected]');
$email->setSubject("Test Send Mail");
$email->setMessage('Hi, Bonjour');
if ($email->send(false) === false) {
throw new Exception('Cannot send email:' . $email->printDebugger(['headers']));
}
// Clear the email
$email->clear();
helper('multi_email');
$email = multi_email(['mailType' => 'html'], 'outlook');
$email->setTo('[email protected]');
$email->setSubject("Test Send Mail");
$email->setMessage('Hi, Bonjour');
if ($email->send(false) === false) {
throw new Exception('Cannot send email:' . $email->printDebugger(['headers']));
}
// Clear the email
$email->clear();
php spark smtpconfig:publish