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

getTextBody() return header #492

Open
vkamelin opened this issue Apr 29, 2024 · 0 comments
Open

getTextBody() return header #492

vkamelin opened this issue Apr 29, 2024 · 0 comments

Comments

@vkamelin
Copy link

vkamelin commented Apr 29, 2024

getTextBody() return header

$cm = new ClientManager($options = []);

$client = $cm->make([
    'host'          => '***',
    'port'          => ***,
    'encryption'    => 'ssl',
    'validate_cert' => true,
    'username'      => '***',
    'password'      => '***',
    'protocol'      => 'pop3'
]);

$client->connect();

if ($client->isConnected()) {
    $folder = $client->getFolder('INBOX');
    $folderInfo = $folder->examine();
    $latestUid = $folderInfo['exists'];
    $query = $folder->query();

    $latestMessage = $query->getMessage($latestUid);
    $max = $latestUid - 1;

        for ($i = $max; $i > ($latestUid - 20); $i--) {
            $message = $query->getMessage($i);

            file_put_contents('data' . $i . '.txt', $message->getTextBody());
            file_put_contents('data' . $i . '.html', $message->getHTMLBody());

        }

    $account->latest_message_id = $latestMessage->getMessageId();

    $client->disconnect();
}

return this:

Content-Type: multipart/alternative; boundar
Over the years, I've had several folks tell me they missed out on the OG Font Awesome Pro Kickstarter. So I promised I'd do my best to make sure folks know when we ran our next campaign. And, it's been a lot of emails, but you only get one shot at some things in life. Like backing the Web Awesome Kickstarter [https://www.kickstarter.com/projects/fontawesome/web-awesome?ref=awcg8w], ending in just 6 hours.

After the Kickstarter ends, Web Awesome Pro goes from $99/yr to preorder pricing at $159/yr. And all Font Awesome Pro deals disappear. It's the last chance to get this price.

Become a Pro Backer → [https://www.kickstarter.com/projects/fontawesome/web-awesome?ref=awcg8w]

https://fontawesome.com

Font Awesome
307 S. Main St. | Suite 202
Bentonville, AR 72712, USA
  • OS: Ubuntu 22.04
  • PHP: 8.1
  • Version 5.5
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

1 participant