Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: Class 'greeny\MailLibrary\Contact' not found in #25

Open
1d0navan opened this issue Dec 14, 2018 · 6 comments
Open

Uncaught Error: Class 'greeny\MailLibrary\Contact' not found in #25

1d0navan opened this issue Dec 14, 2018 · 6 comments

Comments

@1d0navan
Copy link

Hello,

the application can`t find greeny\MailLibrary\Contact in the folders.
i just inserted

use greeny\MailLibrary\Drivers\ImapDriver;
use greeny\MailLibrary\Connection;
use greeny\MailLibrary\Mail;
use greeny\MailLibrary\Mailbox;
use greeny\MailLibrary\Contact;
use greeny\MailLibrary\ContactList;

at the start.
To echo everything out, testwise - i wrote this little test for:

$driver = new ImapDriver('[email protected]', 'awgahiwiNI"N82ng', 'mailserver.de', 993, TRUE);
$connection = new Connection($driver);
$connection->getMailboxes();

$mailbox = $connection->getMailbox('INBOX.Trash');
$selection = $mailbox->getMails();

$selection->limit(5);

foreach($selection as $mail) 
{
	?>
	<div style="width: 500px; height: 100px; overflow-y: scroll; margin-bottom: 20px;">
		<?php echo $mail->xRequestFrom; ?>
	</div>
	<?php
}
@aharabara
Copy link

@1d0navan issue is related to custom autoloader in loader.php . Seems that on master it is fixed

@1d0navan
Copy link
Author

okay, im looking into it.

@200MPH
Copy link

200MPH commented Mar 11, 2021

I pulled from master branch and it's definitely works.

@mschrading
Copy link

I still get this problem when i implement it with: composer require php-mail-client/client
and it version 3.2.2! I think it's the master branch... but there is also a version 3.2.2a !!

How to fix this problem: [Uncaught Error: Class 'greeny\MailLibrary\Contact' not found] ??

Thanks a lot

@srees4
Copy link

srees4 commented Feb 27, 2024

I still get this problem when i implement it with: composer require php-mail-client/client and it version 3.2.2! I think it's the master branch... but there is also a version 3.2.2a !!

How to fix this problem: [Uncaught Error: Class 'greeny\MailLibrary\Contact' not found] ??

Thanks a lot

Same error on my end. When I do composer require php-mail-client/client it downloads ^3.2, so I had to adjust it to use dev-master and problem solved my issue.

@200MPH
Copy link

200MPH commented Feb 27, 2024

OK the branch dev and master are different.
Dev contains PSR-4 autoloader therfore above declaration works.

Two options:

  1. Use this namespaces instead: "greeny\maillibrary\contact"
  2. Checkout to dev branch and pull.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants