I'm trying to write a little PHP script to retrieve and parse my emails. I did some research and found a tutorial on using a pop3 class (pop3.class.php.inc) that I downloaded from PHPClasses website.

The tutorial starts with this:

<?php
 require_once("POP3.class.php5.inc");
 $pop3 = new POP3();
 $pop3->connect('mail.mywebsite.com');
?>

Trying to run that code and I get:

Fatal error: Call-time pass-by-reference has been removed in C:\xampp\htdocs\project\pop3.class.php5.inc on line 240

I'm fairly new to PHP and I don't understand that error. I would like some help to understand what it means and if there's anything I can do to fix it.

有帮助吗?

解决方案

It looks like the class you have found is quite old, and is using features that have been removed from current PHP implementations. It's probably not worth trying to fix this class.

However, you can use the built-in imap functions to retrieve mail from a POP3 mailbox. The reference is here

From the manual, you can open a POP3 mailbox like this (note the /pop3 flag):

// To connect to a POP3 server on port 110 on the local server, use:
$mbox = imap_open ("{localhost:110/pop3}INBOX", "user_id", "password");
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top