You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importconsolafrom'consola'import{extract,LetterparserMail}from'letterparser'import{Client,YapopleClientConfig}from'yapople'constemailService=async(): Promise<LetterparserMail[]>=>{try{constmessageList: LetterparserMail[]=[]if(process.env.EMAIL_ADDRESS&&process.env.EMAIL_PASSWORD&&process.env.EMAIL_HOST){constclientConfig: YapopleClientConfig={host: process.env.EMAIL_HOST,port: 995,tls: true,mailparser: false,username: process.env.EMAIL_ADDRESS,password: process.env.EMAIL_PASSWORD}constclient=newClient(clientConfig)consola.log(`Connecting to ${process.env.EMAIL_HOST}`)awaitclient.connect()constcount=awaitclient.count()consola.log(`${count} messages found on server`)try{constmsgs=awaitclient.retrieveAll()msgs.forEach(msg=>messageList.push(extract(msg.toString())))}catch(err){consola.log(`Error retrieving messages from server: ${err}`)}consola.log(`Messages parsed: ${messageList.length}`)awaitclient.quit()}else{consola.error('EMAIL_ADDRESS, EMAIL_PASSWORD, and EMAIL_HOST environment variables are required')}returnmessageList}catch(error){consola.error(error)throwerror}}exportdefaultemailService
And here's what's happening:
Connecting to imap.migadu.com 14:20:47
285 messages found on server 14:20:47
14:20:53
After all, it takes a lot of emotional energy to curate the best
AWS news for you every week. If you think your AWS bill is high,
you should see my therapy invoices.
Living my truth,
Corey
P.S. Here=E2=80=99s a hot tip for keeping yourself comfy at re:Invent (
https://click.lastweekinaws.com/d0uvkvx9rdamu0m345im/9qhzhdul6698w0c9/aHR0c=
HM6Ly93d3cubGFzdHdlZWtpbmF3cy5jb20vYmxvZy9pbS1hbi1hd3MtY2VydGlmaWVkLWNsb3Vk=
LXByYWN0aXRpb25lci8=3D
). Don=E2=80=99t say it came from me.
What'd you think of this email?
=F0=9F=91=8E (
https://click.lastweekinaws.com/d0uvkvx9rdamu0m345im/e0h97qlxi0unx3z2gwh8/a=
HR0cHM6Ly93d3cubGFzdHdlZWtpbmF3cy5jb20vc3BlY2lhbC90aHVtYnNkb3duLw=3D=3D
)
=F0=9F=91=8D (
https://click.lastweekinaws.com/d0uvkvx9rdamu0m345im/8ghrwvprt3u5468xvxtk/a=
HR0cHM6Ly93d3cubGFzdHdlZWtpbmF3cy5jb20vc3BlY2lhbC90aHVtYnN1cC8=3D
)
---------------
I=E2=80=99m Corey Quinn
---------------
I help companies address their horrifying AWS bills
by both reducing the dollars spent and help
at Client.onData (node_modules/yapople/lib/yapople.js:108:19)
at TLSSocket.emit (events.js:375:28)
at addChunk (internal/streams/readable.js:290:12)
at readableAddChunk (internal/streams/readable.js:265:9)
at TLSSocket.Readable.push (internal/streams/readable.js:204:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
Messages parsed: 0 14:20:53
events.js:352
throw er; // Unhandled 'error' event
^
Error
Emitted 'error' event on TLSSocket instance at:
at TLSSocket._emitTLSError (_tls_wrap.js:892:10)
at TLSWrap.onerror (_tls_wrap.js:416:11)
Once it gets there, it just hangs and never proceeds. As you can see, I've disabled parsing in your library, so that shouldn't be the cause. I'm running Node 14 LTS.
The text was updated successfully, but these errors were encountered:
Here's what I've got:
And here's what's happening:
Once it gets there, it just hangs and never proceeds. As you can see, I've disabled parsing in your library, so that shouldn't be the cause. I'm running Node 14 LTS.
The text was updated successfully, but these errors were encountered: