Uninitialized string offset: 0 |
[eluser]stuffradio[/eluser]
I'm getting this error when I'm trying to use the imap pop class. http://codeigniter.com/wiki/imap_pop_class/ I am using the modified version. Quote:A PHP Error was encountered Any ideas?
[eluser]Matthieu Fauveau[/eluser]
Seems like the $init_array is empty from a quick look on the class code. However I'm not using it so I can't be of much help...
[eluser]sophistry[/eluser]
@stuff thanks for trying the imap_pop class. most of those are notices, not errors. PHP is crying about unintialized variables. that last error shows that the init code you are sending the class is not working to find the proper mailbox. why don't you post some of your code rather than just error messages? also, use code blocks not quote blocks to make code easier to read.
[eluser]stuffradio[/eluser]
Sorry it took so long to reply. I am constantly getting the warning: Quote:A PHP Error was encountered Also the error message: Quote:Array ( [0] => Can't open mailbox {}: invalid remote specification ) Here is the code: Code: <?php
[eluser]sophistry[/eluser]
@stuffradio - as far as i know those functions should work with imap rather than pop, but i don't use them for imap. that may be part of the issue. can you connect to your imap server with the imap functions (take the imap_pop lib out of the picture)? what does this code give you (found at php.net): Code: $mbox = imap_open ("{imap.gmail.com:993/imap/ssl}INBOX", "[email protected]", "password") also, there may be a problem with ssl if your PHP has no ssl support built in. since you are in uncharted waters using the imap account, please refer to this php page and let us know what you find: http://www.php.net/manual/en/function.imap-open.php
[eluser]stuffradio[/eluser]
This is the error: Quote:can't connect: Can't open mailbox imap.gmail.com:995/imap/ssl}INBOX: no such mailbox Note: That it has to be port 995 because that's the imap port. I was just trying port 993 at the time because I was seeing if I could get it to work in other ways, and forgot to change the port back. It still produces the same error message though.
[eluser]sophistry[/eluser]
http://mail.google.com/support/bin/answe...swer=78799 that's not what this google page says... port 993 is the one to use for IMAP. not sure if this is incidental but there is a curly brace missing from the error message posted. probably a forum thing... anyway, the error you see says "no such mailbox"... so it seems to be connecting and getting to imap. here's code that i used (with the imap_pop lib) to connect to google gmail IMAP: Code: $config['server']='imap.gmail.com:993';
[eluser]stuffradio[/eluser]
Yeah well I've gotten a lot further now. I've taken the class found on phpclasses called readattachment class. I can now get the image file, and successfully download it to a folder. I don't know why it only does it once, I want it to do it everytime even if I don't delete the email for testing purposes. What I'm stuck on now is getting the subject, and the message. I'm working on making it do a match case of the username database. This is the format I'm going for: To: [email protected] From: Doesn't matter Subject: <username here> Message: Username: <username> Password: <password> (Will be encrypted and checked in the database) Photo caption: This is a caption EndMessage; It will then, as it is uploading the file upload the info in the database. Do you have any suggestions? This is what I have so far. Code: <?php
[eluser]sophistry[/eluser]
gmail is weird about the way it marks messages as read. so, the message won't be downloaded again. my advice is send a bunch of emails. |
Welcome Guest, Not a member yet? Register Sign In |