0

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.

4

1 回答 1

1

看起来您找到的类已经很老了,并且正在使用已从当前 PHP 实现中删除的功能。尝试修复此类可能不值得。

但是,您可以使用内置imap函数从 POP3 邮箱中检索邮件。参考在这里

从手册中,您可以像这样打开一个 POP3 邮箱(注意 /pop3 标志):

// To connect to a POP3 server on port 110 on the local server, use:
$mbox = imap_open ("{localhost:110/pop3}INBOX", "user_id", "password");
于 2013-10-01T20:08:37.777 回答