-
-
Save AlexGalhardo/e6bc247943bf4d4622230fe4888c0f38 to your computer and use it in GitHub Desktop.
Script para ler e-mails em voz alta usando PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use PhpImap\Mailbox; | |
require_once 'vendor/autoload.php'; | |
$mailbox = new Mailbox( | |
'{imap.gmail.com:993/imap/ssl}INBOX', | |
'[email protected]', | |
'sua senha aqui', | |
); | |
$mailIds = $mailbox | |
->searchMailbox('UNSEEN FROM "[email protected]"'); | |
foreach ($mailIds as $mailId) { | |
$mail = $mailbox->getMail($mailId); | |
createSpeaker()->speak($mail->textPlain); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment