-
-
Save tiagofrancafernandes/f502bfe15c5e71d0be5902828bf09e90 to your computer and use it in GitHub Desktop.
Script para ler e-mails em voz alta usando PHP
This file contains 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', | |
'seu-email@gmail.com', | |
'sua senha aqui', | |
); | |
$mailIds = $mailbox | |
->searchMailbox('UNSEEN FROM "newsletter@filipedeschamps.com.br"'); | |
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