Integrate gmail on your website using IMAP
This tutorial demonstrates how to integrate the basic functionality of the gmail system like displaying
mailboxes and reading emails using IMAP.
Install php5-imap
First thing we should do is to install php5-imap...
More
Integrate gmail on your website using IMAP
This tutorial demonstrates how to integrate the basic functionality of the gmail system like displaying
mailboxes and reading emails using IMAP.
Install php5-imap
First thing we should do is to install php5-imap because it doesn t come with the default php
installation.
To install, use this command:
# apt-get install php5-imap
This will enable us to use imap functions but only in php cli.
We will need to add the imap extension
directive in php.
ini.
extension=imap.
so
Connect to gmail server
<?php
$server = "{imap.
gmail.
com/imap/ssl}";
$username = "my.
email@gmail.
com";
$password = "password";
$conn = imap_open ( $server , $username , $password );
?>
Less