Skip to content

rajkumar-patidar/codeignitor-imap-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Codeignitor Imap Liabrary to get all emails:

To get all unread and read email using gmail login details. This require IMAP library in php. you can install it easily by terminal command in linux.

apt-get install php5-imap

  1. Firstly put imap.php into codeignitor library folder.
  2. Load library into your controller like

$this->load->library('imap');

Set all reuired variables:-

$hostname = '{imap.gmail.com:993/imap/ssl}INBOX';

$username = '[email protected]';

$password = '123456';

To search specific email using subject name into inbox (optional)

$subject = 'HR';

Set maximum featching emails limits (optional)

$maximum = '10';

  1. Now call Imap function into your controller like.

$response = $this->imap->get_emails($hostname,$username,$password,$subject,$maximum);

It will return all email data into response.

About

Codeignitor IMAP Library to gat all emails

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages