Comments (1)
The solution is utterly simple. My misconception was that a Message object was needed for this - it isn't.
Here is a working solution:
...
$client = $this->createImapClient();
$client->connection->appendMessage(
$this->emailAccount->get('imap_sent_folder'),
$this->getSentMIMEMessage()
);
...
protected function createImapClient(): Client
{
$cm = new ClientManager();
$client = $cm->make(
[
'host' => $this->emailAccount->get('imap_host'),
'port' => $this->emailAccount->get('imap_port'),
'encryption' => $this->emailAccount->get('imap_port') == 993 ? 'ssl' : 'starttls',
'validate_cert' => true,
'username' => $this->emailAccount->get('user'),
'password' => $this->emailAccount->get('password'),
'protocol' => 'imap'
]
);
$client->connect();
return $client;
}
from php-imap.
Related Issues (20)
- Discord invite in Readme not working
- ะeader extensions are not extracted correctly
- How can I get email from attribute object? HOT 2
- Email's Footer or Header images (logo/icons) as attachments HOT 1
- parseBody() duplicates attachments
- getHTMLBody() return html with message headers HOT 1
- getTextBody() return header
- Snyk alert about master branch HOT 2
- Sending emails using \Tx\Mailer() and then calling \Webklex \PHPIMAP to obtain the list of sent emails will result in all services being unavailable
- Header parsing issue
- Packagist: Impossible (?) to use current github master (for nesbot/carbon 3 support) with composer
- Children Folders not loading when parent folder has german umlauts. HOT 1
- 5.6.0 HOT 6
- "Empty response" when an empty folder is scanned
- decoding subjects behaves differently if they contain special chars vs. them not containing special chars (GMAIL)
- The from field has been parsed as string when there's ; in the the email name
- The move method does not work
- leaveUnread() does not work if an exception happens during fetching HOT 3
- What is the fastest way to get one 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 php-imap.