Welcome Guest, Not a member yet? Register   Sign In
Receiving IMAP & POP3
#1

What is the suggested or best way to handle this in CI?  I have read several posts on the net and stack overflow but can't get a good feel for what is the best.  Also is there a potential that receiving mail will be integrated into email class & helper?

The imap class listed here does not seem valid any longer
https://github.com/bcit-ci/CodeIgniter/wiki/IMAP
Reply
#2

Ok so i could not find any good guidance on this so I created a new class based on some online resources to pull IMAP emails(credit given in the file).  This class will extend the base email class in CI.  I have attached the MY_Email class as well as the other two classes that are needed, maybe someone else can use them.

You will need to setup the email.php config file with these options.  There are more features that need to be added but this gets me started.

Code:
$config['imap_host'] = 'xxx.xxx.xxx.xxx';
$config['imap_user'] = '[email protected]';
$config['imap_pass'] = 'Jk98S**Jlk';
$config['imap_port'] = '143';
$config['imap_mailbox'] = 'INBOX';
$config['imap_path'] = '';
$config['imap_server_encoding'] = 'utf-8';
$config['imap_attachemnt_dir'] = './tmp/';


Attached Files
.php   MY_Email.php (Size: 16.17 KB / Downloads: 347)
.php   Incoming_Mail_Attachment.php (Size: 680 bytes / Downloads: 251)
.php   Incoming_Mail.php (Size: 2.47 KB / Downloads: 270)
Reply
#3

Had some issues with the class.  Updated them and they are attached.

Thanks

Attached Files
.php   MY_Email.php (Size: 16.81 KB / Downloads: 189)
.php   Incoming_Mail_Attachment.php (Size: 708 bytes / Downloads: 202)
.php   Incoming_Mail.php (Size: 2.47 KB / Downloads: 221)
Reply
#4

Decided to put this into Git.

https://github.com/iwatllc/CI_Imap.git
Reply
#5

(02-07-2015, 01:38 PM)rfulcher Wrote: Decided to put this into Git.

https://github.com/iwatllc/CI_Imap.git

Great! was looking for something similar.
Thanks!
Reply
#6

(02-07-2015, 01:38 PM)rfulcher Wrote: Decided to put this into Git.

https://github.com/iwatllc/CI_Imap.git

i manage to receive email but when the email has attachment i got this error  "Message: file_put_contents(./tmp/14_f_jx3d35240_icon2.png): failed to open stream: No such file or directory
Filename: libraries/MY_Email.php
Line Number: 359"

"$imap_attachemnt_dir    = "./tmp/""
Reply




Theme © iAndrew 2016 - Forum software by © MyBB