https://github.com/defro/codeigniter-mobiledetect
CodeIgniter package dealing with MobileDetect
https://github.com/defro/codeigniter-mobiledetect
Last synced: about 1 year ago
JSON representation
CodeIgniter package dealing with MobileDetect
- Host: GitHub
- URL: https://github.com/defro/codeigniter-mobiledetect
- Owner: defro
- License: mit
- Created: 2017-02-19T23:26:29.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-19T23:34:58.000Z (over 9 years ago)
- Last Synced: 2025-01-27T13:49:29.382Z (over 1 year ago)
- Language: HTML
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A CodeIgniter compatible email-library powered by PHPMailer
===========================================================
Version: 1.2.19
Author: Ivan Tcholakov , 2012-2017.
License: The MIT License (MIT), http://opensource.org/licenses/MIT
This library is intended to be compatible with CI 2.x and CI 3.x.
Tested on CodeIgniter 3.1.3 (January 9th, 2017) and PHPMailer Version 5.2.22 (January 5th, 2017).
Installation
------------
Download this package and uncompress it within `application/` directory of your CodeIgniter site.
PHPMailer Links
---------------
http://phpmailer.worxware.com/
https://github.com/PHPMailer/PHPMailer
Setting It Up (An Example)
--------------------------
* Edit the file `application/config/email.php` which contains the default settings for the email engine. For a Gmail account, the setting might be something like this:
```php
load->library('email');
$subject = 'This is a test';
$message = '
This message has been sent for testing purposes.
';
// Get full html:
$body = '
' . html_escape($subject) . '
body {
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 16px;
}
' . $message . '
';
// Also, for getting full html you may use the following internal method:
//$body = $this->email->full_html($subject, $message);
$result = $this->email
->from('yourusername@gmail.com')
->reply_to('yoursecondemail@somedomain.com') // Optional, an account where a human being reads.
->to('therecipient@otherdomain.com')
->subject($subject)
->message($body)
->send();
var_dump($result);
echo '
';
echo $this->email->print_debugger();
exit;
```
Load the corresponding page, executte this code. Check whether an email has been sent. Read the error message, if any, and make corrections in your settings.
Note, that most of the SMTP servers require "from" address of the message to be the same as the address within $config['smtp_user'] setting.
At the end remove this test.
The API of this library is the same as the original Email API. Read the CodeIgniter's manual about [Email Class](https://www.codeigniter.com/user_guide/libraries/email.html).
Readings
--------
* http://bisakomputer.com/membuat-pengiriman-email-terjadwal-dengan-framework-codeigniter/ - "Membuat Pengiriman Email Terjadwal dengan Framework CodeIgniter" by Arif Rachman, in Indonesian language.