Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
imap-reader
Advanced tools
Readme
This library provides the following features
npm i imap-reader
const imapReader = require("imap-reader");
imapReader.read({
user: 'rolikrinau@hotmail.com',
password: 'all7Do61',
host: 'imap-mail.outlook.com',
port: 993,
tls: true,
type: 'INBOX' // default INBOX if you want to read the spam folder you should type Junk
})
.then(response=>{
console.log(response)
})
.catch(err=>{
console.log(err)
})
{
"status": true,
"data": {
"inbox_length": 3,
"inbox_data": [
{
"html": "<html data>",
"subject": "Yeni Outlook.com hesabınıza hoş geldiniz",
"from": [
{
"address": "no-reply@microsoft.com",
"name": "Outlook Ekibi"
}
],
"to": [
{
"address": "rolikrinau@hotmail.com",
"name": "roli krina"
}
],
"date": "2023-09-23T16:28:53.000Z"
},
{
"html": "<html data>",
"subject": "OpenAI - Verify your email",
"from": [
{
"address": "noreply@tm.openai.com",
"name": "OpenAI"
}
],
"to": [
{
"address": "rolikrinau@hotmail.com",
"name": ""
}
],
"date": "2023-09-23T16:29:00.000Z"
},
{
"html": "<html data>",
"subject": "Test Mail",
"from": [
{
"address": "help@wmaster.net",
"name": "WM AI"
}
],
"to": [
{
"address": "rolikrinau@hotmail.com",
"name": ""
}
],
"date": "2023-09-23T17:11:59.000Z"
}
]
}
}
{
status: false,
data: 'LOGIN failed.'
}
const imapReader = require("imap-reader");
imapReader.waitForLink({
searchLinkString: 'https://mandrillapp.com/track/click/',
imap: {
user: 'alawocolynsm@hotmail.com',
password: 'LKhHSrA80',
host: 'imap-mail.outlook.com',
port: 993,
tls: true
},
timeOut: 0,
type: 'INBOX' // default INBOX if you want to read the spam folder you should type Junk
})
.then(resp => {
console.log(resp)
})
.catch(err => {
console.log(err);
})
searchLinkString: It scans all the links in the incoming mail html data and if the string you send with this variable is in the link, it returns that link to you in an array.
timeOut: (Optional) Specifies how many milliseconds to wait for a link containing a string you send. If not sent, it is set to 2 minutes. 0 If sent, it waits until it arrives. 1 Second = 1000 Milliseconds
{
status: true,
data: [
'https://mandrillapp.com/track/click/31165340/auth0.openai.com?p=eyjzijoilvh4vc1xt2nocmyyvkn1ckturuz4zffwv05jiiwidii6mswicci6intcinvcijozmte2ntm0mcxcinzcijoxlfwidxjsxci6xcjodhrwczpcxfwvxfxcl2f1dggwlm9wzw5has5jb21cxfwvdvxcxc9lbwfpbc12zxjpzmljyxrpb24_dglja2v0ptlobdvzrnzyowjzb0x1au5juktuqjfks0nmbfe3ahf3i1wilfwiawrcijpcimfhnjcwmmrlyjgxodrlmde4ndrlodnmogy1odjlnzuwxcisxcj1cmxfawrzxci6w1wimwm3otuymjnimmq0ymuwmjbmzdjhntbmmmm5yzqxzjewmthlndu0y1wixx0ifq'
]
}
{
status: false,
data: 'No mail with the link was received within the specified time'
}
const imapReader = require("imap-reader");
imapReader.waitForCode({
imap: {
user: 'lassalnimishr@hotmail.com',
password: '91XTVPu69',
host: 'imap-mail.outlook.com',
port: 993,
tls: true
},
timeOut: 0,
codeType: 'number',
codeLength: 9,
querySelector: 'a',
type: 'INBOX' // default INBOX if you want to read the spam folder you should type Junk
})
.then(resp => {
console.log(resp)
})
.catch(err => {
console.log(err);
})
timeOut: (Optional) Specifies how many milliseconds to wait for a link containing a string you send. If not sent, it is set to 2 minutes. 0 If sent, it waits until it arrives. 1 Second = 1000 Milliseconds
codeType: (Optional) Searches only for codes of the type you provide. Species it can take: number, lowerLetter, upperLetter, allLetter, nonAlfanumeric
codeLength: (Optional) Filters strings with the number of characters you give from all html elements.
querySelector: (Optional) It allows you to limit your html content and filter the codes within the html element you select. For example, if it is sent as 'a', it scans the content of the first a tag in the html content.
{
status: true,
data: ['542569865']
}
{
status: false,
data: 'No mail with the code was received within the specified time'
}
FAQs
Returns the header, mail and html information of all messages in the mailbox of the mail you give imap information in array type.
We found that imap-reader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).