Comments (8)
Hi @ssekimuli ,
thanks for posting your question.
I'm not really sure what you are asking.. Please add a brief description or a theoretical example.
Best regards and happy coding,
from laravel-imap.
from laravel-imap.
Thanks for clarifying. You can configure as many accounts as you like inside your config
https://github.com/Webklex/laravel-imap/blob/master/src/config/imap.php#L47 or by providing the same array as options during the initialization https://www.php-imap.com/api/client-manager
Afterwards you can access each configured account via:
/** @var \Webklex\PHPIMAP\ClientManager $cm */
/** @var \Webklex\PHPIMAP\Client $client */
$client = $cm->account('account_identifier');
You could also store the account information somewhere else and just create a new instance on the fly if needed:
/** @var \Webklex\PHPIMAP\ClientManager $cm */
/** @var \Webklex\PHPIMAP\Client $client */
$client = $cm->make([
'host' => 'somehost.com',
'port' => 993,
'encryption' => 'ssl',
'validate_cert' => true,
'username' => 'username',
'password' => 'password',
'protocol' => 'imap'
]);
Best regards & happy coding,
from laravel-imap.
i want to config two emails accounts at once . let say i have outlook and gmail and i want them to under on folder
from laravel-imap.
I see, unfortunately that's not possible - or at least not that I know of. The folders e.g. "INBOX" are located on two different servers which don't know of each other and have nothing in common besides their name. If you want to fetch both, you'll have to connect to both and do what ever you like to do to each folder individually :)
Best regards & happy coding,
from laravel-imap.
P.s.: there is something called "shared inbox" but it has nothing to do with this library and I doubt you could create a shared inbox across providers but you never know :)
Google or DuckDuckGo can probably tell you more about this topic.
from laravel-imap.
getSharedMailbox() do you have this function
so that is connect
sharedMailbox = $client->getSharedMailbox('sharedinbox');
from laravel-imap.
Hi @ssekimuli ,
thanks for the followup. No, such a function doesn't exists - at least not one with this name. What are you expecting this method to do? Perhaps a similar function does exist. Like $client->getFolder("someName")
?
Please try to provide a bit more context, code or examples. Tell the world what you are up to :)
Best regards & happy coding,
from laravel-imap.
Related Issues (20)
- I get an error when I try to connect to Gmail HOT 2
- markAsRead doesn't work in linux manjaro and php 7.3 HOT 1
- How to query using OR HOT 2
- Thread not getting when i used message get by the message_id
- Error when searching Flagged Messages
- Serialization Message object with attachments HOT 1
- is there away to Connect to Shared Mailbox HOT 2
- Can't move email from folder HOT 4
- Class "Webklex\IMAP\Events\FlagNewEvent" not found HOT 3
- Deleting messages in a thread
- I have facing issue on imap_fetchstructure() please refer the below error and provide the proper solution:
- Does it support Socks5
- I've got error on message delete()
- $message->getTextBody() returns content with headers
- Does it work with gmail?
- Trying to get mailbox from multiple clients
- NO LOGIN, Unable to connect to ssl://localhost:993 (Connection refused) HOT 1
- Error when copying a message.
- get replies for specific message
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from laravel-imap.