Catchable fatal error
| From: | Richard Kurth | Date: | Mon, 20 Oct 2008 20:14:43 +0000 |
| Subject: | Catchable fatal error | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-282146@lists.php.net to get a copy of this message | ||
I am getting *Catchable fatal error*: Object of class stdClass could not be converted to string in *C:\web\easycontactpro\openchecker.php* on line *49
line 49 is * $mail_head = imap_headerinfo($conn, $i); what could be casing this. The next line works fine if I delete line 49
$conn = @imap_open("{" . $open['host'] . ":" . $open['port'] . "/" . $open['mailtype'] . "/notls}" . $open['mbeailbox'], $open['username'], $open['password']);
print_r(imap_errors());
$headers = @imap_headers($conn);
if ($headers) {
$email_count = sizeof($headers);
for($i = 1; $i <= $email_count; $i++) {
# Check the body against all saved patterns
$mail_head = imap_headerinfo($conn, $i); <--- Line 49
$mail_body = imap_fetchbody($conn, $i, 1);
echo "mail head: $mail_head<br>\n";
echo "mail body: $mail_body<br>\n";