An open API service indexing awesome lists of open source software.

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

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.